Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No documentation for log format fields #276

Open
wsw70 opened this issue Sep 15, 2018 · 1 comment
Open

No documentation for log format fields #276

wsw70 opened this issue Sep 15, 2018 · 1 comment

Comments

@wsw70
Copy link

wsw70 commented Sep 15, 2018

The documentation paragraph Configuring the Logging Format mentions that

There are two ways to configure formatting: you can either just change the format string or hook in a custom format function.

All the handlers that come with logbook and that log into a string use the StringFormatter by default. Their constructors accept a format string which sets the logbook.Handler.format_string attribute. You can override this attribute in which case a new string formatter is set: (...)

There is no mention of the fields which can be used in the formatting (similar to the LogRecord attributes in standard Python logging module)

@vmalloc
Copy link
Collaborator

vmalloc commented Sep 15, 2018

It's actually very much the same - formatting uses Logbook's own LogRecord class (See https://github.com/getlogbook/logbook/blob/develop/logbook/base.py#L348)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants