Ofunniku / dwarftherapist

Automatically exported from code.google.com/p/dwarftherapist
Other
0 stars 0 forks source link

Improved Logging Configuration #264

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The logging mechanism should be able to log into certain "namespaces", while 
logging at runtime, the logger could be set to different levels per namespace.

Example

LOG = logger.get_namespace("core", "data");
LOGW << "some warning message";
LOGD << "some debug message";

LOG = logger.get_namespace("ui", "viewmanager");
LOGI << "Info message";

Then you could set the level so that you only get info you want in each 
namespace.

logger.set_level("core.data", WARNING);
logger.set_level("ui.viewmanager", DEBUG);

so the previous calls would generate
core.data WARNING some warning message
ui.viewmanager INFO Info message

Notice the debug message in the core.data namespace was ignored.

Original issue reported on code.google.com by treyst...@gmail.com on 30 Jun 2010 at 11:26

GoogleCodeExporter commented 9 years ago

Original comment by treyst...@gmail.com on 13 Oct 2010 at 4:41