-
Notifications
You must be signed in to change notification settings - Fork 715
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
How to log with file name? #915
Comments
You need to set
Reference |
Sorry, I didn't follow u. Does it mean that |
@DeepDuke remove Or, set the |
@Chris-fullerton TKS! It successfully printed the file name in log file. But I was curious about that the terminal output still missed the orignal file name. |
@DeepDuke execute I GUESS that you have not remove the default handler which exists since you execute is same as the default handler. Update: @DeepDuke please refer No Handler, no Formatter, no Filter: one function to rule them all 👍
|
@Chris-fullerton But after adding |
@DeepDuke simply add another
|
@Chris-fullerton @changchiyou Got it! Thanks for your kind help! |
Thanks @changchiyou and @Chris-fullerton for the support. 👍 |
Usually the log looks like this, which doesn't show original filename but
__main__:<module>
2023-07-04 15:30:44.302 | DEBUG | __main__:<module>:13 - Hello World!
How can we specify the configuration to show the original file name, e.g.
test.py
?The text was updated successfully, but these errors were encountered: