1

From documentation I can see that there is such function but it does not work. Why? http://log4javascript.org/docs/quickstart.html

I saw one bug about it, but it was marked as fixed, so I got latest version but bug is still in there.

Vitalii Korsakov
  • 45,737
  • 20
  • 72
  • 90

1 Answers1

2

The trace() method does work but is disabled by default.

Each logger has a level, which defaults to DEBUG. You can change this using its setLevel() method:

var log = log4javascript.getDefaultLogger();
log.setLevel(log4javascript.Level.TRACE);

This will be enough to enable tracing for the default logger, as used in the quick start guide.

There is also a threshold logging level for each appender which can be set via the appender's setThreshold() level. What this level defaults to depends on the appender, but for most appenders the level is ALL, meaning all logging messages sent to the appender are logged.

Tim Down
  • 318,141
  • 75
  • 454
  • 536