Please describe in the Log::Log4perl documentation how to subclass Log::Log4perl::Logger. If this is not possible or undesirable because the class is final this should be documented too. I have tried to subclass Log::Log4perl::Logger without success. From my perspective the general problem is the registry $Log::Log4perl::Logger::LOGGERS_BY_NAME. This registry gets all the time (load time and/or logging initialization time) filled with Log::Log4perl::Logger parent class instances instead of child class instances.
Examples:
At load time of Log::Log4perl::Logger a call of __PACKAGE__->reset(); adds a parent class root logger to the registry.
Logging initialization is based Log::Log4perl::Config. Look at the places where parent class method calls Log::Log4perl::Logger-> are done.
Please describe in the
Log::Log4perldocumentation how to subclassLog::Log4perl::Logger. If this is not possible or undesirable because the class is final this should be documented too. I have tried to subclassLog::Log4perl::Loggerwithout success. From my perspective the general problem is the registry$Log::Log4perl::Logger::LOGGERS_BY_NAME. This registry gets all the time (load time and/or logging initialization time) filled withLog::Log4perl::Loggerparent class instances instead of child class instances.Examples:
At load time of
Log::Log4perl::Loggera call of__PACKAGE__->reset();adds a parent class root logger to the registry.Logging initialization is based
Log::Log4perl::Config. Look at the places where parent class method callsLog::Log4perl::Logger->are done.