Rename 'LogFormat' to 'LogOutputFormat'

This commit is contained in:
Gustavo Cordova Avila
2024-04-11 12:34:59 -07:00
parent b7fd2e48e8
commit 5f58b0dc45

View File

@@ -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)