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

Spider.logger not logging custom extra information #6323

Open
bloodforcream opened this issue Apr 27, 2024 · 0 comments · May be fixed by #6324
Open

Spider.logger not logging custom extra information #6323

bloodforcream opened this issue Apr 27, 2024 · 0 comments · May be fixed by #6324

Comments

@bloodforcream
Copy link

bloodforcream commented Apr 27, 2024

I noticed the implicit behavior of the Spider.logger: when logging with extra, extra ultimately do not end up in the log because they are overwritten by default process method of LoggerAdapter

Current logic:

>>> self.logger.info("test log", extra={"test": "very important information"})
{"message": "test log", "spider": "spider_name"}

Expected logic:

>>> self.logger.info("test log", extra={"test": "very important information"})
{"message": "test log", "spider": "spider_name", "test": "very important information"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant