Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.2, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Embedding, HelpWanted
-
Labels:None
-
Number of attachments :
Description
The current JRuby uses System.err to print out errors.
When embedded inside OSGi containers, or in production scenarios, using System.err is impractical.
slf4j is a logging library widely used and recommended for its composition approach. It provides a mapping to the JDK logger, which is useful to keep the existing behavior.
The work has started with a very limited experiment here:
https://github.com/atoulme/jruby/tree/slf4j
So far:
-changed ivy to download slf4j api and jdk1.4 integration
-changed build.xml to depend on downloading both jars
-changed the prepare task to download the jars as prerequisites.
-added org.slf4j in one class, Ruby, used for propagating NameErrors and the like.
-used the logger in a few places to show use.
TODO:
-work on packaging slf4j api and jdk integration with the distrib
-inline the slf4j code in jruby-complete
-add many more loggers and log more
-add the configuration file in the distrib
-document use and provide instructions for embedding.