add configurable webserver logging to serial

This commit is contained in:
Marcus 2024-10-20 01:32:18 +02:00
parent 7d0880343b
commit 2c2adc9678

View file

@ -68,8 +68,10 @@ void SetupWebserver() {
requestLogger.setOutput(Serial);
// this activates the middleware
if(configSystem.httpLogSerial == true) {
Serial.println(":: [Webserver] configSystem.httpLogSerial is 'true', enable logging to serial");
Serial.println(":: [Webserver] serial request logging is enabled");
webserver.addMiddleware(&requestLogger);
} else {
Serial.println(":: [Webserver] serial request logging is disabled");
}
webserver.onNotFound(WebserverNotFound);