myGrid

Raven logging

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.5
  • Fix Version/s: 1.5
  • Component/s: Taverna Core
  • Labels:
    None

Description

Raven does not use logging, but prints out random things to System.err and System.out.

Since we cannot have dependencies on say log4j from within Raven, a proxy logging class would be needed, that can redirect logging to either log4j or java.util.logging.

Activity

Hide
Stian Soiland-Reyes added a comment - 2006-11-06 14:50

Checked in raven.log.* that handles this. The proxy can print either to stderr, java.util.logging or log4j.

However, the log4j support module requires (obviously) log4j, an dependency that we cannot follow if that class is bundled with Raven. Although MyGridConfiguration in taverna-core can activate log4j, it won't currently work, as we have to make sure that log4j don't have a Raven classloader. If it does, than logging woulde mean calls to Raven which could mean calls to logging, which obviously will recurse. (luckily, within a classloader, Java seems to catch this)

We could do

<artifact groupId="log4j" artifactId="log4j" version="1.2.12" system="true"/>

within the profile, but still we need to place the Log4jLog class in an artifact that will have access to that log4j classloader, probably we would need to include that with system=true as well.

Show
Stian Soiland-Reyes added a comment - 2006-11-06 14:50 Checked in raven.log.* that handles this. The proxy can print either to stderr, java.util.logging or log4j. However, the log4j support module requires (obviously) log4j, an dependency that we cannot follow if that class is bundled with Raven. Although MyGridConfiguration in taverna-core can activate log4j, it won't currently work, as we have to make sure that log4j don't have a Raven classloader. If it does, than logging woulde mean calls to Raven which could mean calls to logging, which obviously will recurse. (luckily, within a classloader, Java seems to catch this) We could do
<artifact groupId="log4j" artifactId="log4j" version="1.2.12" system="true"/>
within the profile, but still we need to place the Log4jLog class in an artifact that will have access to that log4j classloader, probably we would need to include that with system=true as well.
Hide
Stian Soiland-Reyes added a comment - 2006-11-08 14:13

Need to add that artifact to profile and make sure the log4j proxy comes in as well.

Show
Stian Soiland-Reyes added a comment - 2006-11-08 14:13 Need to add that artifact to profile and make sure the log4j proxy comes in as well.
Hide
Stian Soiland-Reyes added a comment - 2006-11-09 12:23

Solved. log4j is added to the profile, and MyGridConfiguration switches Log4jLog on - if possible. This means that Raven switches to log4j-logging after MyGridConfiguration (and therefore log4j.properties) have been loaded.

Javadoc added to raven.log.* that explains how the whole thing work, including how to enable logging of the early Raven.

log4j has to be loaded with the system classloader (and is in the profile), while new artifact raven-log4j (the proxy) can be loaded by Raven, and is therefore dependent by MyGridConfiguration in taverna-core.

Show
Stian Soiland-Reyes added a comment - 2006-11-09 12:23 Solved. log4j is added to the profile, and MyGridConfiguration switches Log4jLog on - if possible. This means that Raven switches to log4j-logging after MyGridConfiguration (and therefore log4j.properties) have been loaded. Javadoc added to raven.log.* that explains how the whole thing work, including how to enable logging of the early Raven. log4j has to be loaded with the system classloader (and is in the profile), while new artifact raven-log4j (the proxy) can be loaded by Raven, and is therefore dependent by MyGridConfiguration in taverna-core.

People

Vote (0)
Watch (0)

Dates

  • Created:
    2006-11-06 13:28
    Updated:
    2006-11-09 12:23
    Resolved:
    2006-11-09 12:23