Disable default JUL Logger

208 views
Skip to first unread message

Niv Gabay

unread,
Mar 17, 2016, 6:31:03 AM3/17/16
to vert.x
Hi,

I am switching my project to use log4j2 by adding `-Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.Log4jLogDelegateFactory and
-Dlog4j.configuationFile="file:log4j2.properties"`.

I have two appenders: Console appender and File appender.

In the Console appender I receive logs in my patternlayout, in addition, I receive com.mongodb.diagnostics.logging.JULLogger.

In File appender i don't receive any log from mongo,

I want that all of my logs will be received in log4j2.

thanks,
niv


Alexander Lehmann

unread,
Mar 17, 2016, 7:39:14 AM3/17/16
to vert.x
I think log4j2 is only backward compatible with log4j if you load an additional log4j to log4j2 bridge jar, otherwise you might try slf4j with the api bridge.

There is an implementation of the vertx logging delegate for log4j2 available in a PR, but that is not yet included in the main vertx code.

Clement Escoffier

unread,
Mar 17, 2016, 9:11:54 AM3/17/16
to ve...@googlegroups.com
Hi,

We don’t support log4j 2 at the moment, it will be in vert.x 3.3.0.
As said by Alexander, to use log4j2, you would need a bridge (I never used it).

Clement


-- 
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/ba685ec8-d116-4283-9c83-dbbe7fe0ecbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages