Re: [base] logging in BASE2
Micha Bayer wrote: > Hi, > > I am running BASE2.1 under Tomcat 5.5 and I am getting my catalina.out > log swamped by BASE log statements. Is there any way I can turn this > off? It doesn't sound normal. What kind of log messages do you get? > I have tried to change the log levels in the log4j.properties file in > www\WEB-INF\classes\, and even deleted this file but it seems to have > made no difference. > > Is the logging configured in the BASE source perhaps? Logging done by BASE is controlled by the log4j.properties file which you already have found. The default settings doesn't log anything except errors and warnings and if these start to appear frequently it is usually something that should be taken care of. Deleting the file is probably not a good idea. It used to cause Hibernate to output lots of INFO-level messages. /Nicklas - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject "unsubscribe" to [EMAIL PROTECTED]
Re: [base] logging in BASE2
Hi Nicklas, the output I am getting is mostly info level messages from both the BASE core and hibernate (no errors or warnings, and BASE generally seems happy otherwise). When I load the BASE front page into the browser, the log starts up with this: INFO: Server startup in 3389 ms 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - Starting BASE 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - auth.driver = null 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - secondary.storage.driver = null 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - cache.timeout = 20 minutes 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - permission.timeout = 10 minutes 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - userfiles = \home\tomcat\projects\base-data 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.dialect = org.hibernate.dialect.MySQLInnoDBDiale ct 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.driver = com.mysql.jdbc.Driver 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.url = jdbc:mysql://sbrn1/base2 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.username = base2user 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.queries = /mysql-queries.xml 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.extended-properties = /extended-properties.xml 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.raw-data-types = /raw-data-types.xml 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.dynamic.catalog = base2dynamic 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.dynamic.schema = null 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - db.batch-size = 50 313 [http-8080-Processor25] INFO net.sf.basedb.core.ExtendedProperties - Loaded extended properties from file: /exten ded-properties.xml 422 [http-8080-Processor25] INFO net.sf.basedb.core - Loaded raw data types from file: /raw-data-types.xml 484 [http-8080-Processor25] INFO org.hibernate.cfg.Environment - Hibernate 3.2 cr3 500 [http-8080-Processor25] INFO org.hibernate.cfg.Environment - hibernate.properties not found 500 [http-8080-Processor25] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib 516 [http-8080-Processor25] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling 609 [http-8080-Processor25] INFO org.hibernate.cfg.Configuration - Searching for mapping documents in jar: BASE2Core. jar 609 [http-8080-Processor25] INFO org.hibernate.cfg.Configuration - Found mapping document in jar: net/sf/basedb/core/ data/AnnotationData.hbm.xml 828 [http-8080-Processor25] INFO org.hibernate.cfg.HbmBinder - Mapping class: net.sf.basedb.core.data.AnnotationData -> Annotations 890 [http-8080-Processor25] INFO org.hibernate.cfg.HbmBinder - Mapping collection: net.sf.basedb.core.data.Annotation Data.inheritingSets -> InheritedAnnotations 890 [http-8080-Processor25] INFO org.hibernate.cfg.Configuration - Found mapping document in jar: net/sf/basedb/core/ data/AnnotationSetData.hbm.xml 922 [http-8080-Processor25] INFO org.hibernate.cfg.HbmBinder - Mapping class: net.sf.basedb.core.data.AnnotationSetDa ta -> AnnotationSets etc. -- I am getting hundreds more lines before I have even logged in, most of them from hibernate. I have checked the log4j.properties file again -- the log level for stdout is set to warn and the logging for hibernate is set to off, so none of this should be getting logged. I have even set the properties to log to file rather than stdout but catalina.out is still getting all of this, so it looks like the settings are not getting picked up at all. Is there any in-code configuration going on anywhere? Thanks Micha == Dr Micha M Bayer Bioinformatics Specialist Genetics Programme The Scottish Crop Research Institute Invergowrie Dundee DD2 5DA Scotland, UK Telephone +44(0)1382 562731 ext. 2309 Fax +44(0)1382 562426 http://www.scri.sari.ac.uk/MichaBayer.htm = > -Original Message- > From: [EMAIL PROTECTED] [mailto:basedb-users- > [EMAIL PROTECTED] On Behalf Of Nicklas Nordborg > Sent: 07 November 2006 07:17 > To: BASE ML > Subject: Re: [base] logging in BASE2 > > Micha Bayer wrote: > > Hi, > > > > I am running BASE2.1 under Tomcat 5.5 and I am getting my catalina.out > > log swamped by BASE log statements. Is there any way I can turn this > > off? > > It doesn't sound normal. What kind of log messages do you get? > > > I have tried to change the log levels in the log4j.properties file in > > www\WEB-INF\classes\, and even deleted this file but it seems to have > > made no differe
Re: [base] logging in BASE2
Micha Bayer wrote: > Hi Nicklas, > > the output I am getting is mostly info level messages from both the BASE > core and hibernate (no errors or warnings, and BASE generally seems > happy otherwise). When I load the BASE front page into the browser, the > log starts up with this: > > INFO: Server startup in 3389 ms > 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - > Starting BASE > 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - > auth.driver = null > 484 [http-8080-Processor25] INFO org.hibernate.cfg.Environment - > Hibernate 3.2 cr3 [snip] > etc. -- I am getting hundreds more lines before I have even logged in, > most of them from hibernate. > > I have checked the log4j.properties file again -- the log level for > stdout is set to warn and the logging for hibernate is set to off, so > none of this should be getting logged. I have even set the properties to > log to file rather than stdout but catalina.out is still getting all of > this, so it looks like the settings are not getting picked up at all. > > Is there any in-code configuration going on anywhere? It looks like the log4j.properties file is beeing ignored. Are you sure that Tomcat is using the directory you think it is using? It could also be that some other logging system is used instead of Log4j. I base this on two observations. 1) Your log output is slightly different from mine. It starts with the text [http-8080-Processor25] which is not present in my output: 11:29:14,782 INFO Environment:500 - Hibernate 3.2 cr3 If you havn't modified the log4j.properties file your log messages should look like that above. 2) If I delete the log4j.properties file I don't get any log messages at all except: log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. More about Tomcat loggin can be found here: http://tomcat.apache.org/tomcat-5.5-doc/logging.html /Nicklas - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject "unsubscribe" to [EMAIL PROTECTED]
Re: [base] logging in BASE2
Mystery solved. This is nothing to do with BASE -- it's Tomcat's fault. It looks like the Tomcat people have changed tack and they are now including a log4j.xml config file by default with Tomcat (it used to be a log4j.properties file, which is what I was initially looking for). This presumably applies to versions from 5.5 onwards -- I never had this problem with 5.0. This file sits in $CATALINA_HOME/common/classes and overrides any application-specific log files that users might supply, including that of BASE. By default the log level in this file is set to level debug, hence all the output from BASE. So the BASE log file wasn't getting picked up at all. To get round this problem, just rename or move Tomcat's log4j.xml file, and make sure any other log4j config files (both .xml and .properties files sit in their respective application's WEB-INF directory. Micha == Dr Micha M Bayer Bioinformatics Specialist Genetics Programme The Scottish Crop Research Institute Invergowrie Dundee DD2 5DA Scotland, UK Telephone +44(0)1382 562731 ext. 2309 Fax +44(0)1382 562426 http://www.scri.sari.ac.uk/MichaBayer.htm = > -Original Message- > From: [EMAIL PROTECTED] [mailto:basedb-users- > [EMAIL PROTECTED] On Behalf Of Nicklas Nordborg > Sent: 07 November 2006 10:53 > To: BASE ML > Subject: Re: [base] logging in BASE2 > > Micha Bayer wrote: > > Hi Nicklas, > > > > the output I am getting is mostly info level messages from both the BASE > > core and hibernate (no errors or warnings, and BASE generally seems > > happy otherwise). When I load the BASE front page into the browser, the > > log starts up with this: > > > > INFO: Server startup in 3389 ms > > 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - > > Starting BASE > > 0[http-8080-Processor25] INFO net.sf.basedb.core.Application - > > auth.driver = null > > 484 [http-8080-Processor25] INFO org.hibernate.cfg.Environment - > > Hibernate 3.2 cr3 > > [snip] > > > etc. -- I am getting hundreds more lines before I have even logged in, > > most of them from hibernate. > > > > I have checked the log4j.properties file again -- the log level for > > stdout is set to warn and the logging for hibernate is set to off, so > > none of this should be getting logged. I have even set the properties to > > log to file rather than stdout but catalina.out is still getting all of > > this, so it looks like the settings are not getting picked up at all. > > > > Is there any in-code configuration going on anywhere? > > It looks like the log4j.properties file is beeing ignored. Are you sure > that Tomcat is using the directory you think it is using? > > It could also be that some other logging system is used instead of > Log4j. I base this on two observations. > > 1) Your log output is slightly different from mine. It starts with the > text [http-8080-Processor25] which is not present in my output: > > 11:29:14,782 INFO Environment:500 - Hibernate 3.2 cr3 > > If you havn't modified the log4j.properties file your log messages > should look like that above. > > 2) If I delete the log4j.properties file I don't get any log messages at > all except: > log4j:WARN No appenders could be found for logger > (org.apache.commons.digester.Digester.sax). > log4j:WARN Please initialize the log4j system properly. > > More about Tomcat loggin can be found here: > http://tomcat.apache.org/tomcat-5.5-doc/logging.html > > /Nicklas > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > The BASE general discussion mailing list > basedb-users@lists.sourceforge.net > unsubscribe: send a mail with subject "unsubscribe" to > [EMAIL PROTECTED] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ DISCLAIMER: This email is from the Scottish Crop Research Institute, but the views expressed by the sender are not necessarily the views of SCRI and its subsidiaries. This email and any files transmitted with it are confidential to the intended recipient at the e-mail address to which it has been addressed. It may not be disclosed or used by any other than that addressee. If you are not the intended recipient you are requested to preserve this confidentiality
Re: [base] logging in BASE2
Micha Bayer wrote: > Mystery solved. This is nothing to do with BASE -- it's Tomcat's fault. > It looks like the Tomcat people have changed tack and they are now > including a log4j.xml config file by default with Tomcat (it used to be > a log4j.properties file, which is what I was initially looking for). > This presumably applies to versions from 5.5 onwards -- I never had this > problem with 5.0. I downloaded 5.5.20, which is the latest Tomcat release, just a few weeks ago and there is no log4j.xml in it. I haven't seen it in any of the other (only 2 or 3) 5.5.x releases I have used. Maybe it was included by mistake in some older release. Actually, their documentation (http://tomcat.apache.org/tomcat-5.5-doc/logging.html) states that there are some known issues with using the log4j.xml file and they recommend that people use log4j.properties. So, it is probably a good idea to check that you don't have a log4j.xml file. /Nicklas - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject "unsubscribe" to [EMAIL PROTECTED]