Skip to content

Change defaults _programmatically_Β #1433

@stdedos

Description

@stdedos

Hello there,

I have read the documentation for personalization

loguru/README.md

Lines 343 to 349 in 764cd30

### Personalizable defaults through environment variables
Don't like the default logger formatting? Would prefer another `DEBUG` color? [No problem](https://loguru.readthedocs.io/en/stable/api/logger.html#env):
```bash
# Linux / OSX
export LOGURU_FORMAT="{time} | <lvl>{message}</lvl>"

but ... can I do this in-code instead? πŸ˜…

Without doing too much work / copying too much code.

I will bite the bullet if because of async operations, some messages manage to bypass my setting of the LOGURU_DEBUG_COLOR=<white>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions