Log level
This commit is contained in:
parent
6d6581991d
commit
3c0707c2a3
|
@ -23,6 +23,7 @@ def main():
|
||||||
parser.add_argument("--control_socket", default="/tmp/nfc.sock")
|
parser.add_argument("--control_socket", default="/tmp/nfc.sock")
|
||||||
parser.add_argument("--valid_tokens", default="/etc/door_tokens")
|
parser.add_argument("--valid_tokens", default="/etc/door_tokens")
|
||||||
parser.add_argument("--log_file", default="/tmp/nfc.log")
|
parser.add_argument("--log_file", default="/tmp/nfc.log")
|
||||||
|
parser.add_argument("--log_level", default="INFO")
|
||||||
parser.add_argument("--mqtt_host", default="10.10.21.2")
|
parser.add_argument("--mqtt_host", default="10.10.21.2")
|
||||||
|
|
||||||
config = parser.parse_args()
|
config = parser.parse_args()
|
||||||
|
@ -31,7 +32,7 @@ def main():
|
||||||
mqttc.connect_async("10.10.21.2", keepalive=60)
|
mqttc.connect_async("10.10.21.2", keepalive=60)
|
||||||
mqttc.loop_start()
|
mqttc.loop_start()
|
||||||
|
|
||||||
init_logging(level=logging.INFO, output_file=config.log_file)
|
init_logging(level=config.log_level, output_file=config.log_file)
|
||||||
|
|
||||||
logger().info("Starting control")
|
logger().info("Starting control")
|
||||||
control = Control(config, mqttc)
|
control = Control(config, mqttc)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user