-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
source_loc corrupted when use in async logger #3227
Comments
The filename pointer is not deep copied by the async logger, so it seems the pointer gets invalidated by the time it get logged. You should use the original FILE pointer or retain pointer somehow. |
@tt4g Thanks for the info. |
See the following comment (it is the decision of maintainer):
|
Arf, ok, so I will but that inside the message body directly and I willl not have issue. |
Hi,
I face an issue when I use async logger +rotating_file sink + source_loc.
The file name and the function name are corrupted.
I go something like this in my output file
Instead of the follwing when I'm using synchronous logger
Basically my code do
Seems really look like memory corruption when thread come into the game.
So I did a really basic test by changing the source_loc struct by
And it's working.
So did I do something wrong ?
Or there is a bug here ?
Thanks in advance for your help
Extra info:
The text was updated successfully, but these errors were encountered: