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
Example of setting output file #294
Comments
Sure! For most use cases, you should be able to use
You can put multiple output paths in the config, and the logs will be written to all of them. Internally, we often want logs sent to both standard out and a file. |
@akshayjshah when i use this logger to log to file,why most of the logs are dropped? |
@MonsieurHorse The production configuration samples logs by default; this prevents deadlocking your process when you suddenly encounter a lot of errors. You can configure this behavior by creating your own Also, it's much easier for me to help you if you keep this discussion on the new issue you opened. It's difficult to respond to comments spread over a number of old issues and PRs. |
Hi @akshayjshah can you explain in detail for log generation? |
Hi @vinod023, it's not clear what you're asking. Also, as @akshayjshah |
Hey there! |
Will the write to file be safe if multiple applications write to the same file? |
In general, no - it’s not safe for multiple processes to write to the same file without some mutual exclusion lock. It’s much safer to include the process name as a field in your log output, have each process write to a separate file, and merge the files during processing. Also, please open new issues for these discussions. It’s hard for maintainers and the rest of the community to track new comments on years-old, closed issues. |
looks like API changed in rc1 version
so can you provide an example how can I write output to a file ?
The text was updated successfully, but these errors were encountered: