Skip to content

env.log_level("LOG_LEVEL") with LOG_LEVEL=info returns "logging.info" function #140

@gnarvaja

Description

@gnarvaja

The current code of log_level handler, just does getattr(value, logging) to get the value, so if you put the log level in lowercase you don't get an error but instead the module funcion is returned.

I made a fix that applies .upper() to the value and also validates the module member getattr(logging, value) is int for extra validation.

PR #138

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