Hi,
I'm trying to get log4j 2.0 debug information printed out in the console
but I couldn't manage to get them.
In log4j 1.x you would set the system property "log4j.debug".
I thought that the mechanism was similar in log4j 2.x and apparently it
should be by setting
log4j2.StatusLogger.level=
The original design was to have the status logger capture messages in a ring
buffer. Then when a listener became available it could print the queued
messages. I know it has been tweaked recently so I am not 100% sure if it is
still working that way, but that is why it is a bit more complicated
All you need to do is set status="trace" in your log4j2.xml config file.
So the beginning of your config looks like this:
On 2014/08/01, at 1:13, Marco Cosentino wrote:
>
> Hi,
> I'm trying to get log4j 2.0 debug information printed out in the console but
> I couldn't manage to get them.
> In
Hi Remko,
thanks for the reply.
I'd still like something which can be enabled through system preoperties
and logs at very early stages, for example, where the config is read from.
Marco.
On 08/01/2014 12:04 AM, Remko Popma wrote:
All you need to do is set status="trace" in your log4j2.xml con
Ok. Take a look at the system properties section of the Configuration manual
page. There seem to be two settings. I'm not sure which to use:
Log4jDefaultStatusLevel or log4j2.StatusLogger.level.
Sent from my iPhone
> On 2014/08/01, at 16:15, Marco Cosentino wrote:
>
> Hi Remko,
> thanks for
What he may really want is a way to register the console listener earlier - via
a system property.
Ralph
On Aug 1, 2014, at 12:24 AM, Remko Popma wrote:
> Ok. Take a look at the system properties section of the Configuration manual
> page. There seem to be two settings. I'm not sure which to
I haven't looked at the code but I thought that's what one of those sys props
did...
Sent from my iPhone
> On 2014/08/03, at 14:57, Ralph Goers wrote:
>
> What he may really want is a way to register the console listener earlier -
> via a system property.
>
> Ralph
>
>> On Aug 1, 2014, at 1
Nope. The ConsoleListener is only added when there is a status attribute on a
configuration element. StatusLogger doesn’t ever register a ConsoleListener
itself. StatusConfiguration in core does that.
Ralph
On Aug 3, 2014, at 12:39 AM, Remko Popma wrote:
> I haven't looked at the code but I
Oh. But if listeners.size() <= 0 statuslogger calls logger.logMessage() where
logger is a SimpleLogger (to the console). You're saying that doesn't work?
Sent from my iPhone
> On 2014/08/03, at 16:58, Ralph Goers wrote:
>
> Nope. The ConsoleListener is only added when there is a status attribu