Skip to content

Make logLevel an instance variable instead of static #173

Open

Description

@armcknight

We use this in an app with two different types of loggers, A and B which inherits from A. We are not able to set their log levels independently because the log level is statically defined on the class Log. If it were instance-level, then this connection would be broken and loggers would behave as expected when setting them to different levels.

Activity

  1. ZevEisenberg commented on Nov 4, 2019

    @ZevEisenberg
    Collaborator

    +1 or at least have a global for general-purpose static logging, but let you override it if you want to instantiate loggers other than the default/shared logger. Progressive disclosure.

  2. chrisballinger commented on Sep 25, 2020

    @chrisballinger
    Contributor

    We just got bit by this again today.

  3. chrisballinger commented on Mar 15, 2021

    @chrisballinger
    Contributor

    If we're keeping score, someone else got bit by this again today.

  4. ZevEisenberg commented on Mar 16, 2021

    @ZevEisenberg
    Collaborator

    Doooo eeeeet

  5. linked a pull request that will close this issueLog enhancements to allow for instances #180on May 26, 2021
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions