db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jdo Wiki] Update of "LoggingDetails" by MichaelWatzek
Date Tue, 06 Sep 2005 14:31:03 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jdo Wiki" for change notification.

The following page has been changed by MichaelWatzek:
http://wiki.apache.org/jdo/LoggingDetails

------------------------------------------------------------------------------
   * '''Derby''' uses propriatary logging.
   * '''JPOX''' uses Log4J.
   * '''Spring``Framework''' (called by TCK) uses Apache commons-logging.
-  * '''TCK testcases''' use Apache commons-logging.
+  * '''TCK testcases''' use Apache Commons-Logging.
   * '''TCK JUnit''' result logging uses proprietary logging.
   * '''TCK result summary''' uses proprietary logging.
  
- Log files are written under a common root directory `tck20/target/logs`. All of the involved
tools/components above are configured to write to a separate subdirectory. When you run the
TCK, the following directories are created:
+ Log files are written under a common root directory `tck20/target/logs`. All involved tools/components
above are configured to write to a separate subdirectory. When you run the TCK, the following
directories are created:
  
   * `.../logs/database/`
   * `.../logs/enhancer/`
@@ -23, +23 @@

  
   * Derby writes log messages to `.../logs/database/derby.txt`.
   * JPOX enhancer writes log messages to directory `.../logs/enhancer/`. Two log files are
written, one for each identity type. The naming pattern is `<identity type>-jpox.txt`.
-  * JPOX runtime writes log messages to the `<timestamp>` directory. Several log files
are written for each TCK configuration, one per database and one per identity type. The naming
pattern is `<database>-<identity type>-<TCKConfiguration>-jpox.txt`.
+  * JPOX runtime writes log messages to the `<timestamp>` directory. Several log files
are written for each TCK configuration, one per database and one per identity type. The naming
pattern is `<database>-<identity type>-<TCK configuration>-jpox.txt`.
-  * TCK test cases write log messages to the `<timestamp>` directory. Several log files
are written for each TCK configuration, one per database and one per identity type. The naming
pattern is `<database>-<identity type>-<TCKConfiguration>-tck.txt`.
+  * TCK test cases write log messages to the `<timestamp>` directory. Several log files
are written for each TCK configuration, one per database and one per identity type. The naming
pattern is `<database>-<identity type>-<TCK configuration>-tck.txt`.
-  * TCK writes JUnit result output to the `<timestamp>` directory. Several log files
are written for each TCK configuration, one per database and one per identity type. The naming
pattern is `<database>-<identity type>-<TCKConfiguration>-junit.txt`.
+  * TCK writes JUnit result output to the `<timestamp>` directory. Several log files
are written for each TCK configuration, one per database and one per identity type. The naming
pattern is `<database>-<identity type>-<TCK configuration>-junit.txt`.
   * TCK writes a result summary file for each run. This file contains information about each
TCK configuration per database and per identity type. It is written to the `<timestamp>`
directory. The file name is `TCK-results.txt`.
  
- = TCK20 Logging Configuration =
+ = TCK20 Logging Configuration Files =
  
  Each of the involved logging implementations use different properties files configuring
logging. These properties files are located in directory `tck20/test/conf`:
  
   * Derby uses `derby.properties`.
   * Log4J uses `log4j.properties`.
-  * Apache commons-logging uses `common-logging.properties`.
+  * Apache Commons-Logging uses `common-logging.properties`.
  
  The TCK junit result logging as well as the TCK result summary logging is not configurable.
  
- We provide another properties file configuring JDK 1.4 logging. This file may be used by
implementations under test. Besides, it is used if Apache commons-logging is configured to
run with JDK 1.4 logging.
+ We provide another properties file configuring JDK 1.4 logging. This file may be used by
implementations under test. Besides, it is used if Apache Commons-Logging is configured to
run with JDK 1.4 logging.
+ 
+ = TCK20 Logger instances =
+ 
+ The TCK uses the following logger instances:
+ 
+ || '''Logger instance''' || '''Log level''' || '''Component''' ||
+ || org.apache.jdo.tck || INFO || TCK test cases ||
+ || org.apache.jdo.tck.pc.company.Company``Model``Reader || ERROR || Spring``Framework ||
+ || org.springframework || ERROR || Spring``Framework ||
+ 
+ The log level of logger instance `org.apache.jdo.tck` defaults to `INFO`. Both remaining
logger instances are used by Spring``Framework. The log level of these logger instances default
to `ERROR`.
+ 
+ '''''Note''': Spring``Framework classes write log messages using log level `INFO`. Since
we do not want to see Spring``Framework `INFO` log messages, we set the log level of Spring``Framework
logger instances to `ERROR`. Due to the fact that TCK class `org.apache.jdo.tck.pc.company.Company``Model``Reader`
extends a Spring``Framework class which retrieves a logger instance calling `LogFactory.getLog(getClass())`,
we have to define a logger instance on class `org.apache.jdo.tck.pc.company.Company``Model``Reader`.''
  
  = TCK20 Logging Configuration for JDO vendors =
  
- JDO implementations using Log4J or JDK 1.4 logging may use specific file appender or file
handler implementations of tck20 in order to write logging output to directory `tck20/target/logs/<timestamp>/`.
This may be achieved by editing files `tck20/test/log4j.properties` or `tck20/test/logging.properties`:
+ JDO implementations using Log4J or JDK 1.4 logging may use specific file appender or file
handler implementations of tck20 in order to write logging output to directory `tck20/target/logs/<timestamp>/`.
This may be achieved by editing file `tck20/test/log4j.properties`: 
  
  {{{
  # log4j vendor specific appender
- log4j.appender.vendor=org.apache.jdo.tck.util.TCKFileAppender
+ log4j.appender.vendor = org.apache.jdo.tck.util.TCKFileAppender
- log4j.appender.vendor.File=vendor.txt
+ log4j.appender.vendor.File = vendor.txt
+ }}}
  
+ or by editing file `tck20/test/logging.properties`:
+ 
+ {{{
  # JDK 1.4 vendor specific handler
  handlers = org.apache.jdo.tck.util.TCKFileHandler
  org.apache.jdo.tck.util.TCKFileHandler.fileName = vendor.txt
@@ -76, +93 @@

  
  Values of properties which do not exist default to `""`. 
  
- = Logging =
+ = Apache Commons-Logging Configuration =
  
- The prototype (see version 2005-02-10 at SubversionRepository) replaces the proprietary
logging implementation in ri11 and tck11 by using the apache commons logging API. This removes
the Logger implementation in ri11 and its query and model specific subclasses. Now the implementation
classes in sub-projects ri11 and tck11 retrieve a logger instance by name and directly call
the logger methods as defined in the apache commons Log interface.
+ Apache Commons-Logging allows to switch between different logging implementations (including
JDK1.4 logging, Log4J and Apache's simple logging implementation). There are three properties
files to configure logging:
  
- = Configuration =
+ || '''Properties file''' || '''Description''' ||
+ || common-logging.properties || Specifies the logging implementation to use. ||
+ || logging.properties || Logger configuration when using JDK 1.4 logging. ||
+ || log4j.properties || Logger configuration when using Log4J logging. ||
+ || simplelog.properties || Logger configuration when using Apache simple logging. ||
  
- Apache commons logging allows to switch between different logging implementations (including
JDK1.4 logging, Log4J and apache's simple logging implementation). We tested with JDK 1.4
logging and the apache simple logging. There are three properties files to configure logging:
+ = Log Level Mapping between JDK 1.4 and Apache Commons-Logging =
  
+ The following table describes the mapping between the log level of JDK 1.4 logging and Apache
Commons-Logging:
- ||Properties file||Description||
- ||common-logging.properties||Specifies the logging implementation to use. It is tested with
JDK 1.4 logging and apache simple logging.||
- ||logging.properties||Logger configuration when using JDK 1.4 logging.||
- ||simplelog.properties||Logger configuration when using apache simple logging.||
  
- = Logger Instances =
+ || '''JDK 1.4''' || '''Apache Commons-Logging''' ||
+ || FINEST||trace ||
+ || FINE, FINER||debug ||
+ || INFO, CONFIG||info ||
+ || WARNING||warn ||
+ || SEVERE||error, fatal ||
+ 
+ = TCK11 and RI11 Logger Instances =
  
  The ri11 sources use the following logger instances:
  
- ||org.apache.jdo.impl.fostore||File Object Store implementation||
+ || '''org.apache.jdo.impl.fostore''' || '''File Object Store implementation''' ||
- ||org.apache.jdo.impl.jdoql||JDOQL query runtime||
+ || org.apache.jdo.impl.jdoql||JDOQL query runtime ||
- ||org.apache.jdo.impl.jdoql.jdoqlc||JDOQL query compiler||
+ || org.apache.jdo.impl.jdoql.jdoqlc||JDOQL query compiler ||
- ||org.apache.jdo.impl.model.jdo||JDOModel implementation||
+ || org.apache.jdo.impl.model.jdo||JDOModel implementation ||
- ||org.apache.jdo.impl.model.jdo.xml||XML parser for JDO metadata files||
+ || org.apache.jdo.impl.model.jdo.xml||XML parser for JDO metadata files ||
- ||org.apache.jdo.impl.pm||PM and PMF implementation||
+ || org.apache.jdo.impl.pm||PM and PMF implementation ||
- ||org.apache.jdo.impl.sco||SCO implementation||
+ || org.apache.jdo.impl.sco||SCO implementation ||
- ||org.apache.jdo.impl.state||State manager implementation||
+ || org.apache.jdo.impl.state||State manager implementation ||
- ||org.apache.jdo.store||Generic store manager implementation||
+ || org.apache.jdo.store||Generic store manager implementation ||
- ||org.apache.jdo.util||Utility classes||
+ || org.apache.jdo.util||Utility classes ||
  
  The ri11 test classes use the following logger instance:
+ 
+ {{{
    org.apache.jdo.test
+ }}}
  
  The tck11 test classes use the following logger instance:
+ 
+ {{{
    org.apache.jdo.tck
+ }}}
  
+ = Log Level Mapping between RI11 Logging and Apache Commons-Logging =
- = Log Level =
- 
- The following describes the mapping between the log level of JDK 1.4 logging and apache
commns logging:
- 
- ||JDK 1.4||Apache commons logging||
- ||FINEST||trace||
- ||FINE, FINER||debug||
- ||INFO, CONFIG||info||
- ||WARNING||warn||
- ||SEVERE||error, fatal||
  
  The following table maps the log level of the former JDORI util.Logger class to apache commons
logging log level:
  
- ||JDORI Logger||Apache||
+ || '''JDORI Logger''' || '''Apache Commons-Logging''' ||
- ||TIME, BUF||trace||
+ || TIME, BUF||trace ||
- ||DEBUG, TEST||debug||
+ || DEBUG, TEST||debug ||
- ||INFO||info||
+ || INFO||info ||
- ||WARN||warn||
+ || WARN||warn ||
- ||ERROR||error||
+ || ERROR||error ||
  

Mime
View raw message