Petals SE JSR181

Give access to the Petals logger in JBIContext

Details

  • Type: Improvement Request Improvement Request
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.1.4
  • Fix Version/s: 1.3.0
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    When one wants to send a JBI exchange from a JSR-181 service, it is not possible to access the logger of the component.
    The service should be able to use the component logger.
    Or the component may have a dedicated logger for services.
    Or should the service create its own logger?

    Logger.getLogger( getClass().getName()).severe( "Failed to send a message to a Petals component." );
    Show
    When one wants to send a JBI exchange from a JSR-181 service, it is not possible to access the logger of the component. The service should be able to use the component logger. Or the component may have a dedicated logger for services. Or should the service create its own logger?
    Logger.getLogger( getClass().getName()).severe( "Failed to send a message to a Petals component." );
  • Environment:
    -

Activity

Hide
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 16:06:52 +0200 - edited

The component should provide a simple way for JSR-181 implementations to log things.
Each service should have a distinct logger.

The logger should be a child of the component's logger.

Petals.Container.Components.petals-se-jsr181.interfaceName.serviceName.edptName

The choice "interfaceName.serviceName.edptName" is arbitrary.
But it should avoid most of the possible conflicts. Thus, we can take it as a convention.
Besides, it allows to configure log levels precisely.

Only local parts of QNames are used in the logger's name.

Show
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 16:06:52 +0200 - edited The component should provide a simple way for JSR-181 implementations to log things. Each service should have a distinct logger. The logger should be a child of the component's logger.
Petals.Container.Components.petals-se-jsr181.interfaceName.serviceName.edptName
The choice "interfaceName.serviceName.edptName" is arbitrary. But it should avoid most of the possible conflicts. Thus, we can take it as a convention. Besides, it allows to configure log levels precisely. Only local parts of QNames are used in the logger's name.
Hide
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 16:31:17 +0200

Commit #32010

Show
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 16:31:17 +0200 Commit #32010

People

Dates

  • Created:
    Tue, 14 Feb 2012 - 16:08:30 +0100
    Updated:
    Tue, 10 Apr 2012 - 19:21:33 +0200
    Resolved:
    Tue, 10 Apr 2012 - 16:31:17 +0200