Skip to content

Unable to use the KwargLogger(formatter=my_custom_formatter) #1

@symbolix

Description

@symbolix

Hi,

Thanks for this amazing logger module. I tried some of the functionalities, however, the bit where we can assign a custom function to the Logger class formatter is not very clear. Could you please help me understand this with a simple example.

By function, do we mean an ordinary function?

def my_line_formatter(msg='message', kwargs={'a': 1, 'b': 2}, fmt='{}={}'):
    pass

Is this going to change the way the extra information is displayed?

Thanks.

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