mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add enableDebug config to turn on logs
This commit is contained in:
parent
d67ff2f330
commit
18cf95ed77
4 changed files with 22 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
import asyncdispatch, strformat
|
||||
import asyncdispatch, strformat, logging
|
||||
from net import Port
|
||||
from htmlgen import a
|
||||
from os import getEnv
|
||||
|
|
@ -18,8 +18,7 @@ const issuesUrl = "https://github.com/zedeus/nitter/issues"
|
|||
let configPath = getEnv("NITTER_CONF_FILE", "./nitter.conf")
|
||||
let (cfg, fullCfg) = getConfig(configPath)
|
||||
|
||||
when defined(release):
|
||||
import logging
|
||||
if not cfg.enableDebug:
|
||||
# Silence Jester's query warning
|
||||
addHandler(newConsoleLogger())
|
||||
setLogFilter(lvlError)
|
||||
|
|
|
|||
Loading…
Reference in a new issue