Atomikos Forum |
|
Hi,
I'm new with atomikos. I did a small Java project example to see if atomikos can fit my needs. It seems to work but on console output I've too many INFO logs and I really don't know how to hide them. Here is my config in sample.properties com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory com.atomikos.icatch.console_file_name = tm-dev.out com.atomikos.icatch.log_base_name = tmlog-dev com.atomikos.icatch.tm_unique_name = com.atomikos.spring.jdbc.tm-dev com.atomikos.icatch.serial_jta_transactions=false com.atomikos.icatch.automatic_resource_registration=true com.atomikos.icatch.max_actives=15000 com.atomikos.icatch.max_timeout=3600000 com.atomikos.icatch.enable_logging=true com.atomikos.icatch.output_dir=c:/test/atomikos-tmp-listener/ com.atomikos.icatch.log_base_dir=c:/test/atomikos-tmp-listener/ com.atomikos.icatch.console_log_level=WARN com.atomikos.icatch.console_file_limit=0 com.atomikos.icatch.console_file_count=5 and in my log4j file i configured a logger like this <logger name="atomikos"> <level value="WARN" /> </logger> Here is what I have on console INFO: atomikos non-xa connection proxy for com.ibm.db2.jcc.t4.b@1f11507: calling toString on vendor connection... Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println INFO: atomikos non-xa connection proxy for com.ibm.db2.jcc.t4.b@1f11507: calling toString on vendor connection... Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println INFO: atomikos non-xa connection proxy for com.ibm.db2.jcc.t4.b@1f11507: calling toString on vendor connection... Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println INFO: addParticipant ( com.atomikos.jdbc.nonxa.AtomikosNonXAParticipant@1ffbe8b ) for transaction com.atomikos.spring.jdbc.tm-dev0214700002 Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println INFO: atomikos non-xa connection proxy for com.ibm.db2.jcc.t4.b@1f11507: calling prepareStatement on vendor connection... Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println INFO: commit() done (by application) of transaction com.atomikos.spring.jdbc.tm-dev0214700002 Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println INFO: atomikos non-xa connection proxy for com.ibm.db2.jcc.t4.b@1f11507: committing on connection... Apr 12, 2011 2:30:39 PM com.atomikos.diagnostics.Slf4jConsole println Can it be due to slf4j, an error in my config ???? thanks for your help Antonio
Do you use sfl4j with e.g. logback or log4j?
Can you post either the complete log4j.properties or logback.xml than or make sure that your logger does not chain its messages to its parent one (e.g. set the additive flag to false in logback.xml). Only a guess - but the logger may chain its messages to the parent (root) logger and this one gots INFO level "on".
Hi
I use log4j Here's my log4j.xml Hope it can help you to see something wrong <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- ****************************************************************************** * Log4j Configuration * * Logging levels (higest to lowest): * off, fatal, error, warn, info, debug, all * A logging request is enabled if its level is * higher than or equal to the level of its logger. ****************************************************************************** --> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <!-- ******************************************************************* --> <!-- ConsoleAppender --> <!-- ******************************************************************* --> <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender"> <param name="Threshold" value="off"/> <layout class="org.apache.log4j.PatternLayout"> <!-- Conversion pattern: Message\n --> <param name="ConversionPattern" value="%m%n"/> </layout> </appender> <appender name="NullAppender" class="org.apache.log4j.varia.NullAppender"> </appender> <!-- ******************************************************************* --> <!-- FileAppender, configure to log only DEBUG to WARN messages --> <!-- According to the level associate to the different --> <!-- loggers, message given to this FileAppender might have already --> <!-- been filtered by a threshold greater than DEBUG --> <!-- ******************************************************************* --> <appender name="MyFileAppender" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="my-logs.log"/> <param name="Append" value="true"/> <filter class="org.apache.log4j.varia.LevelRangeFilter"> <param name="levelMin" value="DEBUG"/> <param name="levelMax" value="WARN"/> </filter> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5p | %m%n"/> </layout> </appender> <!-- ******************************************************************* --> <!-- FileAppender, configure to log only ERROR to FATAL messages --> <!-- According to the level associate to the different --> <!-- loggers, message given to this FileAppender might have already --> <!-- been filtered by a threshold greater than ERROR --> <!-- ******************************************************************* --> <appender name="MyErrorFileAppender" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="my-errors.log"/> <param name="Append" value="true"/> <param name="Threshold" value="ERROR"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5p | %m%n"/> </layout> </appender> <!-- ******************************************************************* --> <!-- Low Level Loggers --> <!-- ******************************************************************* --> <!-- Log hibernate messages --> <logger name="org.hibernate"> <level value="debug"/> </logger> <!-- Log HQL query parser activity --> <logger name="org.hibernate.hql.ast.AST"> <level value="warn"/> </logger> <!-- Log just the SQL --> <logger name="org.hibernate.SQL"> <level value="warn"/> </logger> <!-- Log JDBC bind parameters --> <logger name="org.hibernate.type"> <level value="debug"/> </logger> <!-- Log schema export/update --> <logger name="org.hibernate.tool.hbm2ddl"> <level value="warn"/> </logger> <!-- Log HQL parse trees --> <logger name="org.hibernate.hql"> <level value="warn"/> </logger> <!-- Log cache activity --> <logger name="org.hibernate.cache"> <level value="warn"/> </logger> <!-- Log transaction activity --> <logger name="org.hibernate.transaction"> <level value="warn"/> </logger> <!-- Log JDBC resource acquisition --> <logger name="org.hibernate.jdbc"> <level value="warn"/> </logger> <!-- Track down connection leakages when using DriverManagerConnectionProvider --> <logger name="org.hibernate.connection.DriverManagerConnectionProvider"> <level value="warn"/> </logger> <logger name="atomikos"> <level value="WARN" /> </logger> <!-- ******************************************************************* --> <!-- Packages to log --> <!-- ******************************************************************* --> <logger name="org.springframework.jms.listener.DefaultMessageListenerContainer" additivity="true"> <appender-ref ref="MyFileAppender"/> <appender-ref ref="MyErrorFileAppender"/> </logger> <logger name="com.sample" additivity="true"> <appender-ref ref="MyFileAppender"/> <appender-ref ref="MyErrorFileAppender"/> </logger> <!-- ******************************************************************* --> <!-- Root Logger --> <!-- ******************************************************************* --> <root> <appender-ref ref="NullAppender"/> </root> </log4j:configuration> |