Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to subclass Log::Log4perl::Logger #129

Open
XSven opened this issue Dec 15, 2023 · 0 comments
Open

unable to subclass Log::Log4perl::Logger #129

XSven opened this issue Dec 15, 2023 · 0 comments

Comments

@XSven
Copy link

XSven commented Dec 15, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant