These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to see param values in nhibernate log
PostPosted: Tue Apr 22, 2008 7:19 pm 
Newbie

Joined: Thu Jul 19, 2007 2:46 pm
Posts: 12
Good Night everone

I cant see the value of the query params in nhibernate log, for example i cant see in the log the value of @p1 in any place, How i can config the log to show the params values?

Here is my log file

2008-04-22 16:58:12,606 [10] INFO NHibernate.Loader.Loader.GetResultSet(:0) NHibernate.Loader.Loader - SELECT emissoraun0_.COD_PRACA as COD3___1_, emissoraun0_.COD_UNIDADE_NEGOCIO as COD5___1_, emissoraun0_.DATAINI_UNIDADE as DATAINI1_1_, emissoraun0_.COD_EMISSORA as COD2_1_, emissoraun0_.COD_PRACA as COD3_1_, emissoraun0_.DATAINI_EMISSORA as DATAINI4_1_, emissoraun0_.COD_UNIDADE_NEGOCIO as COD5_1_, emissoraun0_.DATAINI_UNIDADE as DATAINI1_1_0_, emissoraun0_.COD_EMISSORA as COD2_1_0_, emissoraun0_.COD_PRACA as COD3_1_0_, emissoraun0_.DATAINI_EMISSORA as DATAINI4_1_0_, emissoraun0_.COD_UNIDADE_NEGOCIO as COD5_1_0_, emissoraun0_.NOME_EMISSORA_UNIDADE as NOME6_1_0_, emissoraun0_.DATAFIM_UNIDADE as DATAFIM7_1_0_, emissoraun0_.ABR3_UNIDADE as ABR8_1_0_ FROM SUM_RD_EMISSORA_UNIDADE emissoraun0_ WHERE emissoraun0_.COD_PRACA=@p0 and emissoraun0_.COD_UNIDADE_NEGOCIO=@p1
2008-04-22 16:58:12,622 [10] INFO NHibernate.Loader.Loader.GetResultSet(:0) NHibernate.Loader.Loader - SELECT configurac0_.COD_UNIDADE_NEGOCIO as COD9___1_, configurac0_.COD_PRACA as COD10___1_, configurac0_.CONFIGPRACA_COD as CONFIGPR1_1_, configurac0_.CONFIGPRACA_DATAINICIO as CONFIGPR2_1_, configurac0_.CONFIGPRACA_COD as CONFIGPR1_5_0_, configurac0_.CONFIGPRACA_DATAINICIO as CONFIGPR2_5_0_, configurac0_.CONFIGPRACA_QTDENTREVISTA as CONFIGPR3_5_0_, configurac0_.CONFIGPRACA_DIRETORIOARQUIVOCOLETA as CONFIGPR4_5_0_, configurac0_.CONFIGPRACA_DIRETORIOARQUIVOTEMPORARIO as CONFIGPR5_5_0_, configurac0_.CONFIGPRACA_DIRETORIORESULTADO as CONFIGPR6_5_0_, configurac0_.USUARIO_NOME as USUARIO7_5_0_, configurac0_.CONFIGPRACA_DATAFIM as CONFIGPR8_5_0_, configurac0_.COD_UNIDADE_NEGOCIO as COD9_5_0_, configurac0_.COD_PRACA as COD10_5_0_ FROM SPMM_CONFIGURACAOPRACA configurac0_ WHERE configurac0_.COD_UNIDADE_NEGOCIO=@p0 and configurac0_.COD_PRACA=@p1

My config file

<?
xml version="1.0" encoding="utf-8" ?>
<
configuration>
<!--
Esta se‡Æo contˆm as configura‡äes do Hibernate -->
<
configSections>
<
section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
<

section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</

configSections>

<

hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<

session-factory>
<

property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<

property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<

property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<

property name="connection.connection_string">Server=MDDB03SP;initial catalog=DBSUM;User ID=tvprogram;Password=wrote;Min Pool Size=2</property>
<

property name="ShowSql">true</property>
<

mapping assembly="ProducaoMidiaMix" />
</

session-factory>
</

hibernate-configuration>


<!--

Esta se‡Æo contˆm as configura‡äes do log4net -->
<

log4net debug="true">
<!--

Define some output appenders -->
<

appender name="trace" type="log4net.Appender.TraceAppender, log4net">
<

layout type="log4net.Layout.PatternLayout,log4net">
<

param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</

layout>
</

appender>
<

appender name="console" type="log4net.Appender.ConsoleAppender, log4net">
<

layout type="log4net.Layout.PatternLayout,log4net">
<

param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</

layout>
</

appender>
<

appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net" >
<

param name="File" value=".//log.txt" />
<

param name="AppendToFile" value="true" />
<

param name="RollingStyle" value="Date" />
<

param name="DatePattern" value="yyyy.MM.dd" />
<

param name="StaticLogFileName" value="true" />
<

layout type="log4net.Layout.PatternLayout,log4net">
<

param name="ConversionPattern" value="%d [%t] %-5p %l %c - %m%n" />
</

layout>
</

appender>
<

appender name="ProcessLog" type="log4net.Appender.RollingFileAppender,log4net" >
<

param name="File" value=".//Processlog.txt" />
<

param name="AppendToFile" value="true" />
<

param name="RollingStyle" value="Date" />
<

param name="DatePattern" value="yyyy.MM.dd" />
<

param name="StaticLogFileName" value="true" />
<

layout type="log4net.Layout.PatternLayout,log4net">
<

param name="ConversionPattern" value="%d - %m%n" />
</

layout>
</

appender>
<!--

Setup the root category, add the appenders and set the default priority -->
<

logger name="ProcessLogger" additivity="false">
<

level value="DEBUG"/>
<

appender-ref ref="ProcessLog"/>
</

logger>

<

root>
<

priority value="INFO" />
<

appender-ref ref="rollingFile" />
</

root>

</

log4net>
<!--

Esta se‡Æo contˆm as configura‡äes do aplicativo -->
<

appSettings>

<

add key="BlocoAudiencia" value="30"/>
<

add key="HorarioInicial" value="06:00:00"/>
<

add key="HorarioFinal" value="29:59:59"/>

</

appSettings>


</

configuration>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.