From 5f58b0dc45791908c3d219b4c4dccf692bbf8abe Mon Sep 17 00:00:00 2001 From: Gustavo Cordova Avila Date: Thu, 11 Apr 2024 12:34:59 -0700 Subject: [PATCH] Rename 'LogFormat' to 'LogOutputFormat' --- src/logging.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/logging.nim b/src/logging.nim index 4b2c383..1dc75db 100644 --- a/src/logging.nim +++ b/src/logging.nim @@ -53,7 +53,7 @@ type COMMON, # Similar to Apache CommonLog Format TEXT # A more verbose text logging format -proc parseLogFormat*(str: string; raiseErr: bool = false): LogOutputFormat = +proc parseLogOutputFormat*(str: string; raiseErr: bool = false): LogOutputFormat = ## Parse a logging format name into it's value let ustr = str.toUpperAscii() for i in LogOutputFormat: @@ -104,13 +104,13 @@ proc setLogLevel*(lvl: string) = ## Set the log level from its string representation logsLevel = lvl.parseLogLevel() -proc setLogFormat*(fmt: LogOutputFormat) = +proc setLogOutputFormat*(fmt: LogOutputFormat) = ## Set the log output format to 'fmt' logsFormat = fmt -proc setLogFormat*(fmt: string) = +proc setLogOutputFormat*(fmt: string) = ## Set the log output format to 'fmt' - logsFormat = fmt.parseLogFormat() + logsFormat = fmt.parseLogOutputFormat() ################################################################ @@ -333,7 +333,7 @@ when isMainModule: for fmt in LogOutputFormat: echo "*** Setting log format to: ", $fmt - setLogFormat(fmt) + setLogOutputFormat(fmt) for ll in LogLevel: echo "** Setting level to: ", $ll setLogLevel(ll)