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)