Skip to content

Commit

Permalink
abbreviate NOTICE with NTC instead of NOT (#140)
Browse files Browse the repository at this point in the history
The existing `NOT` abbreviation when logging at `NOTICE` level may be
confusing. Proposing to change the abbreviation to `NTC` instead.
  • Loading branch information
etan-status authored Nov 29, 2023
1 parent b879544 commit a5c81f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions chronicles/helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func parseTopicDirectives*(directives: openArray[string]): Table[string, TopicSe
forEachTopic: topic.logLevel = DEBUG
of "inf", "info":
forEachTopic: topic.logLevel = INFO
of "not", "notice":
of "ntc", "notice", #[legacy compatibility:]# "not":
forEachTopic: topic.logLevel = NOTICE
of "wrn", "warn":
forEachTopic: topic.logLevel = WARN
Expand All @@ -43,4 +43,3 @@ func parseTopicDirectives*(directives: openArray[string]): Table[string, TopicSe
forEachTopic: topic.logLevel = FATAL
else:
raise newException(ValueError, &"'{parts[0]}' is not a recognized log level.")

2 changes: 1 addition & 1 deletion chronicles/log_output.nim
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ template shortName(lvl: LogLevel): string =
of TRACE: "TRC"
of DEBUG: "DBG"
of INFO: "INF"
of NOTICE:"NOT"
of NOTICE:"NTC" # Legacy: "NOT"
of WARN: "WRN"
of ERROR: "ERR"
of FATAL: "FAT"
Expand Down

0 comments on commit a5c81f3

Please sign in to comment.