Switch to using simple-properties module
This commit is contained in:
@@ -7,3 +7,4 @@ srcDir = "src"
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
requires "nim >= 2.0.0"
|
requires "nim >= 2.0.0"
|
||||||
|
requires "ssh://git@gitlab.disney.com/cordg017/simple-properties.git >= 1.0.1"
|
||||||
|
|||||||
@@ -4,7 +4,16 @@
|
|||||||
## [Thu Mar 7 11:25:18 AM PST 2024]
|
## [Thu Mar 7 11:25:18 AM PST 2024]
|
||||||
## Changed formatting to JSON output
|
## Changed formatting to JSON output
|
||||||
import std/[exitprocs, locks, strutils, terminal, times]
|
import std/[exitprocs, locks, strutils, terminal, times]
|
||||||
import ./properties
|
import properties
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
## Read the property values
|
||||||
|
##
|
||||||
|
let
|
||||||
|
beVerbose: bool = getPropBool("beVerbose", false)
|
||||||
|
beDebugging: bool = getPropBool("beDebugging", false)
|
||||||
|
LoggingLevel: string = getPropStr("loggingLevel", "INFO")
|
||||||
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
## Log levels, and functions to convert to/from
|
## Log levels, and functions to convert to/from
|
||||||
@@ -74,7 +83,7 @@ type
|
|||||||
var
|
var
|
||||||
logsLock: Lock
|
logsLock: Lock
|
||||||
logsStream: File = stdout
|
logsStream: File = stdout
|
||||||
logsLevel: LogLevel = properties.LoggingLevel.parseLogLevel()
|
logsLevel: LogLevel = LoggingLevel.parseLogLevel()
|
||||||
logsFormat: LogOutputFormat = JSON
|
logsFormat: LogOutputFormat = JSON
|
||||||
logsIsTTY: bool = false
|
logsIsTTY: bool = false
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# just let's get these definitions out of the way
|
|
||||||
let
|
|
||||||
beVerbose* = true
|
|
||||||
beDebugging* = true
|
|
||||||
LoggingLevel* = "INFO"
|
|
||||||
Reference in New Issue
Block a user