Add --trace and --no-log-dates; add docs

This commit is contained in:
Philipp Heckel 2022-06-02 10:50:05 -04:00
parent 7845eb0124
commit 5cc0b194d3
9 changed files with 286 additions and 217 deletions

View file

@ -83,6 +83,11 @@ func SetLevel(newLevel Level) {
level = newLevel
}
// DisableDates disables the date/time prefix
func DisableDates() {
log.SetFlags(0)
}
// ToLevel converts a string to a Level. It returns InfoLevel if the string
// does not match any known log levels.
func ToLevel(s string) Level {