force debug log when compiled with -DEMSESP_DEBUG

This commit is contained in:
proddy
2020-07-26 21:41:45 +02:00
parent 7109bb0d62
commit b7e72fd18f

View File

@@ -519,13 +519,15 @@ void Console::start() {
// shell->log_level(uuid::log::Level::DEBUG); // order is: err, warning, notice, info, debug, trace, all // shell->log_level(uuid::log::Level::DEBUG); // order is: err, warning, notice, info, debug, trace, all
#endif #endif
#if defined(EMSESP_DEBUG)
shell->log_level(uuid::log::Level::DEBUG); // order is: err, warning, notice, info, debug, trace, all
#endif
#if defined(EMSESP_STANDALONE) #if defined(EMSESP_STANDALONE)
// always start in su/admin mode when running tests // always start in su/admin mode when running tests
shell->add_flags(CommandFlags::ADMIN); shell->add_flags(CommandFlags::ADMIN);
#endif #endif
emsesp::EMSESP::watch(EMSESP::WATCH_OFF); // turn watch off in case it was still set in the last session
// start the telnet service // start the telnet service
// default idle is 10 minutes, default write timeout is 0 (automatic) // default idle is 10 minutes, default write timeout is 0 (automatic)
// note, this must be started after the network/wifi for ESP32 otherwise it'll crash // note, this must be started after the network/wifi for ESP32 otherwise it'll crash
@@ -533,6 +535,9 @@ void Console::start() {
telnet_.start(); telnet_.start();
telnet_.default_write_timeout(1000); // in ms, socket timeout 1 second telnet_.default_write_timeout(1000); // in ms, socket timeout 1 second
#endif #endif
// turn watch off in case it was still set in the last session
emsesp::EMSESP::watch(EMSESP::WATCH_OFF);
} }
// handles telnet sync and logging to console // handles telnet sync and logging to console