Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1892 (closed enhancement: fixed)

Opened 14 years ago

Last modified 14 years ago

Logger: different log levels for different appenders

Reported by: dhasenan Assigned to: kris
Priority: normal Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: Cc:

Description

I have an application and will normally want to log info and above to a file (for debugging), but only warning and above to the console (because these might be relevant to the end user -- at least, in case of a crash or something similarly bad, they can use that to google for solutions).

Tango's logging would require me to have different loggers for the file and for the console, and log anything I want to appear in both the file and on the console with both loggers. I'd rather specify the logging level for each appender. It would be convenient to keep the current notion of logging levels for each logger -- that lets you turn on full debugging information for only one module.

For reference, log4net allows you to specify a minimum level for each appender.

Change History

04/24/10 22:31:36 changed by kris

adding the ability to set a minimal level for an appender seems like a good idea, but it would only be done up-front when the appender is configured (probably)

05/10/10 01:31:17 changed by kris

added getter/setter level() and level(Level l) to Appender, and adjusted to emitter to take that value into account

05/10/10 01:31:26 changed by kris

  • status changed from new to closed.
  • resolution set to fixed.

(In [5446]) fixes #1892 :: Logger: different log levels for different appenders

kudos to dhasenan