Only log the terminal output to disk if the "--debug" commandline switch is given
Otherwise slowdowns might be caused on Raspberry Pi when dumping all printer communication to SDmaster
parent
1477fb31fb
commit
178b2f36d7
|
@ -519,17 +519,20 @@ class Server():
|
|||
}
|
||||
},
|
||||
"loggers": {
|
||||
"SERIAL": {
|
||||
"level": "DEBUG",
|
||||
"handlers": ["serialFile"],
|
||||
"propagate": False
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"level": "INFO",
|
||||
"handlers": ["console", "file"]
|
||||
}
|
||||
}
|
||||
|
||||
if debug:
|
||||
self._config["loggers"]["SERIAL"] = {
|
||||
"level": "DEBUG",
|
||||
"handlers": ["serialFile"],
|
||||
"propagate": False
|
||||
}
|
||||
|
||||
logging.config.dictConfig(self._config)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue