Adds ASCII log option needed by portudino (#4443)

* Adds ASCII logs useful to portudino

Activates ASCII log option when stdout is not a terminal.  This is
generally the right thing to do; if not, the behavior can be
overridden in config.yaml using AsciiLogs under Logging.  The result
is reasonable system logs for portudino when running under systemd or
the like.

Signed-off-by: Christopher Hoover <ch@murgatroid.com>
This commit is contained in:
Christopher Hoover
2024-08-15 17:09:06 -07:00
committed by GitHub
parent d398419aef
commit 85176756ec
5 changed files with 76 additions and 23 deletions

View File

@@ -53,7 +53,8 @@ enum configNames {
webserverport,
webserverrootpath,
maxtophone,
maxnodes
maxnodes,
ascii_logs
};
enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9488, hx8357d };
enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 };
@@ -62,4 +63,4 @@ enum { level_error, level_warn, level_info, level_debug, level_trace };
extern std::map<configNames, int> settingsMap;
extern std::map<configNames, std::string> settingsStrings;
extern std::ofstream traceFile;
int initGPIOPin(int pinNum, std::string gpioChipname);
int initGPIOPin(int pinNum, std::string gpioChipname);