This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Enable early logging with environment variables #123
Merged
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.
The existing logging is not helpful enough to be able to diagnose issues that happen during initialization. For
configure()
to be able to communicate with the worker and poller threads to set up logging in the first place, the target thread needs to be running and processing commands - so if it never has a chance to get that far, it's difficult to figure out what's going on.Setting
WATCHER_LOG_MAIN
,WATCHER_LOG_WORKER
, orWATCHER_LOG_POLLING
to either"stdout"
,"stderr"
, or the path to a file will configure the logger for the appropriate thread at the earliest possible moment.