Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __setup_logger(self, log_filename: str) -> None:

# create a new formatter with our desired format
formatter = Formatter(
'[{%(asctime)s} %(levelname)-7s %(filename)10s : %(lineno)-4s] %(funcName)30s %(message)s %(threadName)s',
'%(asctime)s %(levelname)s %(threadName)s %(name)s %(filename)s:%(lineno)s %(message)s',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Finding a particular log message within our codebase isn't difficult via search so I think %(filename)s:%(lineno)s should be removed too.

I'm keeping it for now to minimise this change but my recommendation is to remove it and start using the name field to properly identify logical units within our own code e.g. cwac.crawler, cwac.browser. This would be a single line change to the top of each module e.g. in crawler.py:

- logger = logging.getLogger('cwac')
+ logger = logging.getLogger('cwac.crawler')

# Log timestamp format (ISO 8601)
'%Y-%m-%dT%H:%M:%S%z',
)
Expand Down
Loading