iPopo Log Sevice

8 views
Skip to first unread message

Matthias Leinweber

unread,
Feb 10, 2020, 3:52:00 PM2/10/20
to ipopo-users
Hello,

i just discovered iPopo/Pelix and i am very excited. Great work!

However, I struggle with the log service. What is the best way to add a custom (standard) formatter? I tried to add a root appender, but logservice works the other way around.
Do i have to re-implement the appender for the log service?
... my aim is to log in logstash format.

best regards,
Matthias

Thomas Calmant

unread,
Feb 11, 2020, 4:13:01 AM2/11/20
to ipopo-users
Hi Matthias,

Currently, iPOPO doesn't support the formatter approach. That could be a feature to add.

The idea of the log service is to allow you writing your own log listener, i.e. an object
that implements a "logged(log_entry)" method and that registers itself to the log reader service .
The argument of logged() is a bean that contains all the informations of the entry, and which
__str__ method returns what you see using the "log" shell command.
That is during that call that you can write the log entry, either on the console, in a file, ...

Note that the shell command works differently: it gets the latest entries from the log reader
and prints them using the str() method.

Best regards,
Thomas

Matthias Leinweber

unread,
Feb 11, 2020, 4:29:14 AM2/11/20
to ipopo...@googlegroups.com
Yeah i have some experience with pax-logging from java-osgi.

What do you think to change the LogEntry Class to "native" log -> record and add the additionally infos (bundle, etc) to the dict.  So we could use traditionally appenders within ipopo logging?

best regards,
Matthias

--
Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "ipopo-users".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/ipopo-users/7tmyroWUEHg/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse ipopo-users...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/ipopo-users/b43060d5-214f-4754-a0fe-ed5ed9cf8056%40googlegroups.com.

Thomas Calmant

unread,
Feb 11, 2020, 8:10:55 AM2/11/20
to ipopo-users
I think I'd prefer having an additional method in LogEntry, giving a logging.Formatter as argument.

Le mardi 11 février 2020 10:29:14 UTC+1, Matthias Leinweber a écrit :
Yeah i have some experience with pax-logging from java-osgi.

What do you think to change the LogEntry Class to "native" log -> record and add the additionally infos (bundle, etc) to the dict.  So we could use traditionally appenders within ipopo logging?

best regards,
Matthias

Am Di., 11. Feb. 2020 um 10:13 Uhr schrieb Thomas Calmant
Hi Matthias,

Currently, iPOPO doesn't support the formatter approach. That could be a feature to add.

The idea of the log service is to allow you writing your own log listener, i.e. an object
that implements a "logged(log_entry)" method and that registers itself to the log reader service .
The argument of logged() is a bean that contains all the informations of the entry, and which
__str__ method returns what you see using the "log" shell command.
That is during that call that you can write the log entry, either on the console, in a file, ...

Note that the shell command works differently: it gets the latest entries from the log reader
and prints them using the str() method.

Best regards,
Thomas

Le lundi 10 février 2020 21:52:00 UTC+1, Matthias Leinweber a écrit :
Hello,

i just discovered iPopo/Pelix and i am very excited. Great work!

However, I struggle with the log service. What is the best way to add a custom (standard) formatter? I tried to add a root appender, but logservice works the other way around.
Do i have to re-implement the appender for the log service?
... my aim is to log in logstash format.

best regards,
Matthias

--
Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "ipopo-users".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/ipopo-users/7tmyroWUEHg/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse ipopo-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages