From 30fdcceea3efbd264b00d78fb0f86fd5a2ff8831 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Mon, 6 Jun 2022 14:45:41 +0200 Subject: src: improve logging Adds new logging handler redirecting messages to the log file located in the Samba shared directory (applies to live mode clients, i.e: ogLive) Parses log level configuration from ogclient.json. See: { "opengnsys": { ... "log": "INFO", ... } ... } Adds --debug option to set root logger level to DEBUG when starting ogClient. Overrides log level from config file. In addition: - Replaces any occurence of print with a corresponding logging function. - Unsets log level for handlers, use root logger level instead. - Default level for root logger is INFO. - Replaces level from response log messages to debug (ogRest) --- cfg/ogclient.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cfg/ogclient.json') diff --git a/cfg/ogclient.json b/cfg/ogclient.json index 1a43d1b..b1f1f43 100644 --- a/cfg/ogclient.json +++ b/cfg/ogclient.json @@ -2,7 +2,7 @@ "opengnsys": { "ip": "127.0.0.1", "port": 8889, - "log": "DEBUG", + "log": "INFO", "mode": "live", "url": "https://127.0.0.1/opengnsys/varios/menubrowser.php", "url_log": "http://localhost/cgi-bin/httpd-log.sh" -- cgit v1.2.3-18-g5258