You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Don Brown <do...@gmail.com> on 2009/08/07 05:41:13 UTC
Capturing logging per bundle
I'm trying to come up with a better way to capture log messages for
users, but I'm coming up short. What I want is the ability for Felix
to be logging every message with the bundle id or object, then I can
implement their logger and capture and display the information
accordingly. Users should be able to click on a bundle and see all
log messages for that bundle, including but not limited to, resolution
or dynamic package lookup errors. Unfortunately, the Logger API
doesn't have this ability so I'm left with parsing the error message
somehow.
How does everyone else solve this?
Don
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Capturing logging per bundle
Posted by Don Brown <do...@gmail.com>.
Yes, I mean the log messages from the Felix framework.
Don
On Fri, Aug 7, 2009 at 5:34 PM, Marcel Offermans
<ma...@luminis.nl> wrote:
> Hello Don,
>
> On Aug 7, 2009, at 5:41 , Don Brown wrote:
>
>> I'm trying to come up with a better way to capture log messages for
>> users, but I'm coming up short. What I want is the ability for Felix
>> to be logging every message with the bundle id or object, then I can
>> implement their logger and capture and display the information
>> accordingly. Users should be able to click on a bundle and see all
>> log messages for that bundle, including but not limited to, resolution
>> or dynamic package lookup errors. Unfortunately, the Logger API
>> doesn't have this ability so I'm left with parsing the error message
>> somehow.
>
> I'm not quite sure I follow you...
>
> If you look at the OSGi LogService and focus on the aspect of reading log
> messages, then each message is a LogEntry. LogEntry has a getBundle() that
> contains a reference to the bundle that logged the message. In other words,
> that should answer your question, but...
>
> What exactly do you mean by "the Logger API"?
> Are you talking about the log messages that Felix the framework produces, or
> log messages from normal bundles?
>
> Greetings, Marcel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Capturing logging per bundle
Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Don,
On Aug 7, 2009, at 5:41 , Don Brown wrote:
> I'm trying to come up with a better way to capture log messages for
> users, but I'm coming up short. What I want is the ability for Felix
> to be logging every message with the bundle id or object, then I can
> implement their logger and capture and display the information
> accordingly. Users should be able to click on a bundle and see all
> log messages for that bundle, including but not limited to, resolution
> or dynamic package lookup errors. Unfortunately, the Logger API
> doesn't have this ability so I'm left with parsing the error message
> somehow.
I'm not quite sure I follow you...
If you look at the OSGi LogService and focus on the aspect of reading
log messages, then each message is a LogEntry. LogEntry has a
getBundle() that contains a reference to the bundle that logged the
message. In other words, that should answer your question, but...
What exactly do you mean by "the Logger API"?
Are you talking about the log messages that Felix the framework
produces, or log messages from normal bundles?
Greetings, Marcel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org