On 27/09/2007, Richard S. Hall <[EMAIL PROTECTED]> wrote:
>
> Burak Taysi wrote:
> > Hi,
> >
> > I was looking at the LogService implementation in the Felix Source
> code.  It keeps all the messages in memory and we can
> > add a LogListener to retrieve the messages for the LogService.
> >
> > Was there a reason for this approach?
> >
>
> The current log service implementation was just intended to be very
> simple.
>
> I, personally, am not a logging expert, but I am pretty sure others on
> the list know more. You might even find that there are log service
> implementations already available to do what you want.
>
> Any suggestions, people?


Hi Burak,

bit of a plug, but you might want to try pax-logging:

  http://wiki.ops4j.org/confluence/display/ops4j/Pax+Logging


http://repository.ops4j.org/maven2/org/ops4j/pax/logging/pax-logging-api/0.9.6

http://repository.ops4j.org/maven2/org/ops4j/pax/logging/pax-logging-service/0.9.6

it supports various 'classic' logging APIs and provides a LogService
implementation
- it uses log4j underneath and supports configuration using the
configuration admin
service (such as via pax-confman).

if you have any questions or find problems using it, just ping
[EMAIL PROTECTED]
and you should get a quick response - pax-logging is getting close to
a 1.0release so
feedback is very welcome :)

-> richard
>
> > Currently, we are not fully using a LogService to log our debug/info
> messages, but are using log4j instead.  I have noticed
> > that when I use a local OBR to download bundles into our running Felix
> and run them - I get warning messages from log4j
> > that someone is attempting to append data to a closed appender
> [CONSOLE].
> >
> > I thought this might be caused by the fact that ALL the bundles we have
> written use the same exact log4j.xml file to write
> > formatted messages to the console.  I am guessing that somehow one of
> the bundles is closing the default output stream (console),
> > so the other bundles then generate errors (and I lose the messages).
> >
> > So my first thought was to write an implementation of the LogService
> myself using log4j to write to the console.
> > Then after looking at the existing implementation - the other thought
> was to write a LogListener (using LogReaderService) to the
> > existing LogService implementation and have that write to the console
> using log4j.
> >
> > With EITHER approach, I will use log4j.  This way any changes in the
> future - console vs logfile or local vs server, can be done
> > with modifications to a single log4j.xml file in a single bundle.
> >
> > Do you have a recommendation on which approach to take?
> >
> >
> > Burak Taysi
> > Tech Specialist - Patient Touch (E.S.)
> > BJC Health Care - IS Department
> > 343 S. Kirkwood Rd., Suite 202
> > St. Louis, MO   63122
> >
> > (PH) 314-362-9864
> > (FX) 314-747-3450
> > (Num PG) 314-360-4345
> > (Text PG) [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
Cheers, Stuart

Reply via email to