forked from go-log/log
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nest: Add PreNest marker (and other cleanups)
The PreNest marker allows us to drop the empty-string delimiters from library callers and still get readable output from fmt.Print-style renderers. I've added a new unit test showing that log implementations that want to detect Markers should use reflect.DeepEqual or something else that is stricter than ==. I've also adjusted the expected order of keys in the unit-test map. Currently this output is unstable, but [1,2,3] will have the order stabilized in future Go releases. The change here sets us up for compatibility with that new logic. I've also made the Newf and Logf implementations more compact by turning them into wrappers around New and Log respectively. [1]: https://go-review.googlesource.com/c/go/+/142737/ [2]: golang/go@a440cc0 [3]: golang/go#21095
- Loading branch information
Showing
2 changed files
with
45 additions
and
9 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