wiki:CORE_LOGGING_R0
Last modified 3 years ago Last modified on 12/03/08 17:39:50

Analysis

Overview

The logging should be revised especially the configuration should be fixed. A tutorial should be migrated from the old wiki. More attention should be paid on testing and runtime logging.

Task requirements

  • Migrate and review the logging tutorial from the old wiki.
  • Review logging format output.
  • Find a way to make all modules use a single logging hierarchy.
  • Configure logging so that log files are always at the same place no matter whether we run tests, the project from eclipse or the project as a standalone application. (may be left for the next revision if this runs out of time)

Task result

The result of this task is a wiki page, configuration file(s) and source code.

Implementation idea

  • You can look at Pax Logging (http://wiki.ops4j.org/confluence/display/ops4j/Pax+Logging). I suppose it can be helpful as it is OSGI-ed version of log4j.
  • Look the format of appenders of lo4j.properties file and think whether it's good enough
  • Try putting log4j config in the resources of the application.

http://asteasolutions.net/mediawiki/index.php/Veda-Design-R2#Logging

How to demo

  • Start Sophie 2.0 and show where and how it logs.

Design

  • Stick to Log4j for this revision. Pax Logging is cool but it needs module configuration implemented first.
  • Exclude log4j from the embedded dependencies of all modules except for those starting the application.
  • Delete all log4j.properties files except those in the modules starting the application.
  • The tutorial is migrated and as we are still using log4j it is suitable. LOGGING
  • Use Class.getResource method to load the log4j config file.
  • make TestBase load its config from a fixed place.

Implementation

  • log4j.proprties files are located only in org.sophie2.author and org.sophie2.server modules (the starting modules)
  • for testing purposes the log4j.properties file is loaded from org.sophie2.core.testing.
  • all logs are stored in the /trunk/sophie2-platform folder
  • Changes can be viewed here: 642

Testing

Comments

Log

Analysis: Pap - done(30m)
Review: Peko - 3 OK. - 5mins - Overview should be more general. Task requirements should not overlap the overview part.
Design:
Implementation:
Testing:
Comments: