Skip to content

Allow time format in translogger to be configured by kwarg #80

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

Merged
merged 2 commits into from
Oct 2, 2023
Merged

Conversation

cdent
Copy link
Collaborator

@cdent cdent commented Aug 26, 2023

If no arg is provided, a default_time_format is used.

Fixes #73

If no arg is provided, a default_time_format is used.

Fixes #73
@@ -29,9 +35,11 @@ def __init__(self, application,
logging_level=logging.INFO,
logger_name='wsgi',
setup_console_handler=True,
set_logger_level=logging.DEBUG):
set_logger_level=logging.DEBUG,
time_format=None):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not assign the default right here?

Suggested change
time_format=None):
time_format=default_time_format):

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically just to keep the same pattern used for format in line 28/34.

Which is perhaps not sufficient reason technically, but I tend to want to stick with existing patterns, especially in paste where everything is so weird and old and sometimes confusing.

Thus minimal changes.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you.

@cdent cdent merged commit 8eea6ac into master Oct 2, 2023
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

Successfully merging this pull request may close these issues.

UnicodeDecodeError on German Date with Umlaut (ex. März)
2 participants