[slf4j-user] Design help -> Hook on log event

jeremfg jeremiefauchergoulet at hotmail.com
Fri Jun 29 22:29:44 CEST 2012


I've been working on the migration of our application from log4j to slf4j...

Our reason to turn to slf4j, is that our application will be used by third
party clients, and some third party module will be integrated as well!

Everything is working fine, currently using the log4j as underlying logging
framework...

To understand the need, a little background info on the project... The
application in question is running on a UAV, an autonomous drone, and logs
are sent in real time to the ground (via a TCP+SSL Socket) as well as
written to file on the non-volatile storage on board (kinda like a black
box).

Currently, we've implemented a special log4j appender in the application
code. This appender retrieve the log information through the LoggingEvent to
build a POJO, and sends it's information to the ground via our internal
mechanism...

The problem, is we have log4j coupled with the code because of this appender
(our way to intecept log events for now), and we'd like to make it
independent...

Is there any hook we can use, something to incerept log events inside our
application, using slf4j, which would allow us to remain "logger
independent"?

Or any suggestion on how to go about this? The only way I see now, is to
create my own wrapper over slf4j, which seems like a bad idea to me!

--
View this message in context: http://slf4j.42922.n3.nabble.com/Design-help-Hook-on-log-event-tp4025154.html
Sent from the slf4j - user mailing list archive at Nabble.com.


More information about the slf4j-user mailing list