You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2006/06/06 20:42:29 UTC

[jira] Created: (FELIX-77) Modify framework's internal logger to use Log Service if present

Modify framework's internal logger to use Log Service if present
----------------------------------------------------------------

         Key: FELIX-77
         URL: http://issues.apache.org/jira/browse/FELIX-77
     Project: Felix
        Type: Improvement

  Components: Framework  
    Reporter: Richard S. Hall
    Priority: Minor


The framework implementation uses an internal Logger class for logging errors, warnings, etc. This Logger class mimics the Log service interface, but is currently hard-coded to output all information to the console. The idea behind this class is that it should direct log messages to a Log service if one is present. Its approach should get the bundle context from the system bundle and listen for Log services. Since we don't want to require the Log service package on the class path, the solution should use reflection to invoke methods on the Log service when it is present.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (FELIX-77) Modify framework's internal logger to use Log Service if present

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FELIX-77?page=comments#action_12456916 ] 
            
Richard S. Hall commented on FELIX-77:
--------------------------------------

I guess I should have also added...

I tested this and it appeared to work, but for those who are interested in this issue, please put these changes through their paces and report back to the mailing list if you run into any issues or open a new JIRA issue. Thanks.

> Modify framework's internal logger to use Log Service if present
> ----------------------------------------------------------------
>
>                 Key: FELIX-77
>                 URL: http://issues.apache.org/jira/browse/FELIX-77
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Richard S. Hall
>         Assigned To: Richard S. Hall
>            Priority: Minor
>
> The framework implementation uses an internal Logger class for logging errors, warnings, etc. This Logger class mimics the Log service interface, but is currently hard-coded to output all information to the console. The idea behind this class is that it should direct log messages to a Log service if one is present. Its approach should get the bundle context from the system bundle and listen for Log services. Since we don't want to require the Log service package on the class path, the solution should use reflection to invoke methods on the Log service when it is present.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (FELIX-77) Modify framework's internal logger to use Log Service if present

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FELIX-77?page=all ]

Richard S. Hall updated FELIX-77:
---------------------------------

    Assignee: Richard S. Hall

> Modify framework's internal logger to use Log Service if present
> ----------------------------------------------------------------
>
>                 Key: FELIX-77
>                 URL: http://issues.apache.org/jira/browse/FELIX-77
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Richard S. Hall
>         Assigned To: Richard S. Hall
>            Priority: Minor
>
> The framework implementation uses an internal Logger class for logging errors, warnings, etc. This Logger class mimics the Log service interface, but is currently hard-coded to output all information to the console. The idea behind this class is that it should direct log messages to a Log service if one is present. Its approach should get the bundle context from the system bundle and listen for Log services. Since we don't want to require the Log service package on the class path, the solution should use reflection to invoke methods on the Log service when it is present.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (FELIX-77) Modify framework's internal logger to use Log Service if present

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FELIX-77?page=all ]

Richard S. Hall closed FELIX-77.
--------------------------------

    Resolution: Fixed

Ok, I have committed an initial attempt to resolve this issue. The internal Felix logger now tracks available Log Services and uses the highest ranking service to log its messages. If no service is present, then it uses stdout.

I also implemented a new configuration property to control the log level:

felix.log.level - An integer value indicating the degree of logging reported by the framework; a higher value results in more logging. If zero ('0') is specified, then logging is turned off completely. The log levels match those specified in the OSGi Log Service (i.e., 1 = error, 2 = warning, 3 = information, and 4 = debug). The default value is 1.

> Modify framework's internal logger to use Log Service if present
> ----------------------------------------------------------------
>
>                 Key: FELIX-77
>                 URL: http://issues.apache.org/jira/browse/FELIX-77
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Richard S. Hall
>         Assigned To: Richard S. Hall
>            Priority: Minor
>
> The framework implementation uses an internal Logger class for logging errors, warnings, etc. This Logger class mimics the Log service interface, but is currently hard-coded to output all information to the console. The idea behind this class is that it should direct log messages to a Log service if one is present. Its approach should get the bundle context from the system bundle and listen for Log services. Since we don't want to require the Log service package on the class path, the solution should use reflection to invoke methods on the Log service when it is present.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira