-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept a special value "null" for LOG_DESTINATION
This parses a new value `"null"` as a `LogDestination`. On non-Windows systems, it'll be equivalent to `"@/dev/null"`. On Windows systems, `"@\\.\NUL"` (an explicitly-namespaced form for the `NUL` device[^1]). Closes #50. I chose not to investigate the open question about whether or not `LOG_DESTINATION=NUL` would already Just Work. I decided it didn't matter, for two reasons: 1. While it's likely "specifying `NUL`" may conceptually work, it's very possible you still need to practically use `LOG_DESTINATION=\\.\NUL` to do it. That would not be very discoverable and the escaping required would be quite error-prone, making the `null` sugar valuable. 2. Mixed-OS teams attempting to have null as a default in (e.g.) `.env` can't do so today. Without this sugar, such teams would have to concretely pick `/dev/null` or `NUL`. Together, this seemed like enough to warrant the small bit of alias complexity. [^1]: https://stackoverflow.com/a/58177337
- Loading branch information
Showing
4 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters