Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Corona Logging"

(Required Bundles)
(Required Bundles)
Line 12: Line 12:
  
 
Bundles/classes/libraries required by Corona Logging:
 
Bundles/classes/libraries required by Corona Logging:
 
+
<br/><br/>
 
* bundle: ''org.eclipse.corona.logger.log4j''
 
* bundle: ''org.eclipse.corona.logger.log4j''
 
** class: ''org.eclipse.corona.logger.log4j.listeners.Log4jListener'' -> log listener converting OSGi log events to log4j logs
 
** class: ''org.eclipse.corona.logger.log4j.listeners.Log4jListener'' -> log listener converting OSGi log events to log4j logs
 
** class: ''org.eclipse.corona.logger.log4j.Log4jBundleActivator'' -> bundle activator responsible for log4j listener initialization and registration within OSGi Log Reader Service
 
** class: ''org.eclipse.corona.logger.log4j.Log4jBundleActivator'' -> bundle activator responsible for log4j listener initialization and registration within OSGi Log Reader Service
 
** log4j.properties -> configuration of log4j loggers, appenders, layouts etc.used by Corona
 
** log4j.properties -> configuration of log4j loggers, appenders, layouts etc.used by Corona
 +
<br/>
 +
* bundle: ''org.apache.log4j_1.2.13''
 +
** library: ''log4j-1.2.13.jar'' -> log4j package
 +
** class: ''org.eclipse.corona.logger.log4j.appenders.EclipseLogAppender'' -> log4j appender responsible for sending logs to eclipse platform (when eclipse application is run/debug, eclipse platform registers a listener responsible for sending logs events to Error Log view), class not required by Corona Logging
 +
<br/>
 +
* bundle: ''org.eclipse.corona.tools''
 +
** class: ''org.eclipse.corona.log.CoronaLogService'' -> Log Service wrapper responsible for:
 +
*** retrieval of LogService reference
 +
*** retrieval of DebugOptions service reference - service responsible for loading debug tracking options defined with the use of ''.options'' file. For detailed information see: [Eclipse Debug Options chapter]
 +
*** enabling LogService API
 +
<blockquote>
 +
CoronaLogService wrapper is to be used by any Corona bundle activator. See: [Sample Bundle Activator using CoronaLogService].
 +
</blockquote>

Revision as of 07:30, 17 August 2006

OSGi Log Service

Corona Logging uses OSGi Log Service. OSGi specifies two log services:

  • Log Service - allows bundles to log information including a message, a level, an exception, a ServiceReference object, and a Bundle object
  • Log Reader Service - allows bundles to access a list of LogEntry objects, and allows the registration of a LogListener object that receives LogEntry objects as they are created.

To extend control over log statements log4j package is used. It is plugged into Corona through the LogListener object registered with the use of the OSGi Log Reader Service.

For details on OSGi services see: OSGi Service Platform, Service Compendium, Release4, August 2005.

Required Bundles

Bundles/classes/libraries required by Corona Logging:

  • bundle: org.eclipse.corona.logger.log4j
    • class: org.eclipse.corona.logger.log4j.listeners.Log4jListener -> log listener converting OSGi log events to log4j logs
    • class: org.eclipse.corona.logger.log4j.Log4jBundleActivator -> bundle activator responsible for log4j listener initialization and registration within OSGi Log Reader Service
    • log4j.properties -> configuration of log4j loggers, appenders, layouts etc.used by Corona


  • bundle: org.apache.log4j_1.2.13
    • library: log4j-1.2.13.jar -> log4j package
    • class: org.eclipse.corona.logger.log4j.appenders.EclipseLogAppender -> log4j appender responsible for sending logs to eclipse platform (when eclipse application is run/debug, eclipse platform registers a listener responsible for sending logs events to Error Log view), class not required by Corona Logging


  • bundle: org.eclipse.corona.tools
    • class: org.eclipse.corona.log.CoronaLogService -> Log Service wrapper responsible for:
      • retrieval of LogService reference
      • retrieval of DebugOptions service reference - service responsible for loading debug tracking options defined with the use of .options file. For detailed information see: [Eclipse Debug Options chapter]
      • enabling LogService API

CoronaLogService wrapper is to be used by any Corona bundle activator. See: [Sample Bundle Activator using CoronaLogService].

Back to the top