Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Json Formatter overridden by _get_json_formatter #401

@djpugh

Description

@djpugh
  • logzero version: 1.7.0
  • Python version: 3.7.9
  • Operating System: Windows 10

Description

Thanks for the great library!
I was setting up a custom JSON formatter for logging a specific json message (using a custom json default), however this was stymied through

_formatter = _get_json_formatter(json_ensure_ascii) if json else formatter or LogFormatter()

    _formatter = _get_json_formatter(json_ensure_ascii) if json else formatter or LogFormatter()

Is this intended behaviour (happy to override the formatter in the handler after creating?

Otherwise would suggest checking if isinstance(formatter, JsonFormatter)?

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