Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provide logger implementation that allows writing application logs to a file if
DEBUG
mode environment variable is enabled.Closes #592.
Example usage
This will write a log file called
revive.log
created in the current working directory, where all subsequent application logs will be appended.The implementation is very basic as I thought we could start with something simple and build from there, if necessary. I decided to use an environment variable instead of a command-line flag to make it easier to activate this functionality in CI environments. If people have a strong preference to use the command-line option instead, I'm happy to change it (or allow both).
Another assumption I made was that we'd want to write application logs to a file instead of stdout, so as not to mix up application output with debug information.
Feedback welcome on the above or anything else I may have missed!