Re: Passing arrays as parameters via log4j.xml & log4j.properties

2017-12-07 Thread Matt Sicker
I haven't tested this out, but from the plugin documentation < http://logging.apache.org/log4j/2.x/manual/plugins.html>, if you make a plugin that implements Collection, then you can automatically convert its children into that collection. In that use case, though, you'd need another plugin

Re: Setting different log levels to different appenders for a specific package (logger)

2017-12-07 Thread Matt Sicker
I don't remember if there's a simpler way to do it, but the advanced way of doing this would be using a RoutingAppender which delegates to those two different appender refs you have. You can also take a look at additivity which is related to what you're asking about. On 7 December 2017 at 06:10,

Passing arrays as parameters via log4j.xml & log4j.properties

2017-12-07 Thread Debraj Manna
Cross posting from stackoverflow Can some one let me know is it possible to pass array or list to a log4j appender property via log4j.xml or log4j.properties? Something like below in

Setting different log levels to different appenders for a specific package (logger)

2017-12-07 Thread Asma Zinneera Jabir
I want package com.abc.xyz to log only ERRORs to the console and INFO and above to a file. How do I give the configuration in log4j2.xml for this? Tried doing the below but didn't work.