refac: make WGDashboard logging level configurable (#915)

* feat: init configurable logging level

* refac: correct some logging functions to debug from info. They were not that informational

* fix: logging somehow was broken due to disablement of external loggers

* refac: set default to info

---------

Co-authored-by: Daan Selen <dselen@systemec.nl>
This commit is contained in:
DaanSelen
2025-09-22 18:20:22 +02:00
committed by GitHub
parent b7e65f7caf
commit 8b541229d8
11 changed files with 55 additions and 30 deletions

View File

@@ -174,7 +174,7 @@ class AmneziaWireguardConfiguration(WireguardConfiguration):
def getPeers(self):
self.Peers.clear()
current_app.logger.info(f"Refreshing {self.Name} peer list")
current_app.logger.debug(f"Refreshing {self.Name} peer list")
if self.configurationFileChanged():
with open(self.configPath, 'r') as configFile:
@@ -183,7 +183,7 @@ class AmneziaWireguardConfiguration(WireguardConfiguration):
content = configFile.read().split('\n')
try:
if "[Peer]" not in content:
current_app.logger.info(f"{self.Name} config has no [Peer] section")
current_app.logger.debug(f"{self.Name} config has no [Peer] section")
return
peerStarts = content.index("[Peer]")