You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Tim-Christian Mundt (JIRA)" <ji...@apache.org> on 2013/07/17 23:39:47 UTC
[jira] [Created] (LOG4PHP-209) log4php hierarchical namespace
loggers
Tim-Christian Mundt created LOG4PHP-209:
-------------------------------------------
Summary: log4php hierarchical namespace loggers
Key: LOG4PHP-209
URL: https://issues.apache.org/jira/browse/LOG4PHP-209
Project: Log4php
Issue Type: Improvement
Components: Code
Affects Versions: 2.3.0
Environment: debian
Reporter: Tim-Christian Mundt
Priority: Critical
Logger hierarchy is denoted by dots, PHP hierarchy (namespaces) is denoted by backslashes. It would be very helpful to be able to configure loggers for namespaces. E.g. we have an email component with the someco\mail namespace. Now I want to configure the corresponding loggers. I'd be content with either <logger name="someco.mail"> or <logger name="someco\mail">.
Right now I'm using a simple hack which replaces backslashes with dots in LoggerHierarchy::getLogger() which works like a charm but is probably not the correct way to fix this.
So please allow to have PHP namespaces as logger hierarchy (which is log4j behavior, isn't it?). Maybe I'm simply missing something, but I cannot get it to work.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira