Switch to using simple-properties module

This commit is contained in:
Gustavo Cordova Avila
2024-04-11 11:53:32 -07:00
parent 97e5c3c086
commit fa463781fc
3 changed files with 12 additions and 7 deletions

View File

@@ -7,3 +7,4 @@ srcDir = "src"
# Dependencies
requires "nim >= 2.0.0"
requires "ssh://git@gitlab.disney.com/cordg017/simple-properties.git >= 1.0.1"

View File

@@ -4,7 +4,16 @@
## [Thu Mar 7 11:25:18 AM PST 2024]
## Changed formatting to JSON output
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
@@ -74,7 +83,7 @@ type
var
logsLock: Lock
logsStream: File = stdout
logsLevel: LogLevel = properties.LoggingLevel.parseLogLevel()
logsLevel: LogLevel = LoggingLevel.parseLogLevel()
logsFormat: LogOutputFormat = JSON
logsIsTTY: bool = false

View File

@@ -1,5 +0,0 @@
# just let's get these definitions out of the way
let
beVerbose* = true
beDebugging* = true
LoggingLevel* = "INFO"