Support log domain specific log handlers

Bug #537681 reported by wouter bolsterlee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anewt
New
Undecided
Unassigned

Bug Description

It would be useful to complement the AnewtLog::add_handler() API with AnewtLog::add_handler_for_domain(). The log handlers added with the latter will only log messages with the specified domain.

That being done, Anewt modules can start logging all kind of useful stuff using the 'anewt' domain. An example use case debug messages with the executed SQL queries in the database layer.

Tags: logging
Revision history for this message
wouter bolsterlee (wbolster) wrote :

It could also be useful to have the log domain stuff handle everything starting with a prefix, so that e.g. database queries can be logged using the 'anewt-database' log domain.

Perhaps some convention like AnewtLog::add_handler_for_domain('anewt*', $handler); can be used for this.

description: updated
tags: added: logging
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.