Hi!
Currently loggers are placed into a hierarchy by dividing the logger name
by dots, e.g. a logger named "foo.bar.Baz" will be the child of "foo.bar",
and grandchild of "foo". The dot is used because it's a delimiter for
namespaces in Java (and as such was ported from log4j).
Since the PHP namespace notation uses backslash as a delimiter, I propose
to use backspace as a delimiter for logger names as well (of course we
would also leave dot delimiter for backward compatibility).
In this case logger named "foo\bar\Baz" would be child of "foo\bar", etc.
This would make nice things like this possible:
namespace org\apache\log4php;
class MyClass {
function log() {
$log = Logger::getLogger(__CLASS__);
$log->info('bla');
}
}
In this example, __CLASS__ would resolve into "org\apache\log4php\MyClass"
which would correctly be placed in logger hierarchy.
Any objections?
Ivan