Skip to content

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

Description

@XSven

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions