mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
config options for logging
This commit is contained in:
parent
b0e617f32f
commit
8f43a434bd
2 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,8 @@ type
|
|||
dbDatabase*: string
|
||||
# general
|
||||
uploadDir*: string
|
||||
enableLogs*: bool
|
||||
enableErrorLogs*: bool
|
||||
|
||||
|
||||
#! Taken from https://github.com/zedeus/nitter
|
||||
|
@ -52,6 +54,8 @@ proc getConfig(): Cfg =
|
|||
dbDatabase: config.get("Database", "dbDatabase", ""),
|
||||
# general
|
||||
uploadDir: config.get("General", "uploadDir", "./uploads/"),
|
||||
enableLogs: config.get("General", "enableLogs", true),
|
||||
enableErrorLogs: config.get("General", "enableErrorLogs", true),
|
||||
)
|
||||
|
||||
var cfg* {.threadvar.}: Cfg
|
||||
|
|
|
@ -29,4 +29,8 @@ const defaultConf* =
|
|||
[General]
|
||||
; This is the path to the directory which contains all users' uploaded files.
|
||||
#uploadDir = "./uploads/"
|
||||
; Allows creating and logging to the log file. If this is on, it forces `enableErrorLogs` on as well.
|
||||
#enableLogs = "true"
|
||||
; Same as `enableLogs` but only for error or fatal messages. Forced on, if `enableLogs` is on.
|
||||
#enableErrorLogs = "true"
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue