Hallo,
ich habe eine Frage zum Logging.
Ich habe in der logging.yaml folgendes konfiguriert:
[code]
file_additional:
class: logging.handlers.TimedRotatingFileHandler
formatter: simple
level: DEBUG
when: midnight
backupCount: 7
filename: ./var/log/smarthome-full.log
encoding: utf8
file:
class: logging.handlers.TimedRotatingFileHandler
level: WARNING
formatter: detail
when: midnight
backupCount: 7
filename: ./var/log/smarthome.log
loggers:
__main__:
handlers: [file_additional]
level: DEBUG
[code]
Jetzt würde ich erwarten, dass alles, was in smarthome.log auch in smarthome-full.log steht, dass aber ins smarthome.log noch mehr steht.
Dem ist aber nicht so. Folgende Einträge finde ich nur in der smarthome.log, nicht aber in der smarthome-full.log:
Was habe ich falsch verstanden?
Gruß,
Hendrik
ich habe eine Frage zum Logging.
Ich habe in der logging.yaml folgendes konfiguriert:
[code]
file_additional:
class: logging.handlers.TimedRotatingFileHandler
formatter: simple
level: DEBUG
when: midnight
backupCount: 7
filename: ./var/log/smarthome-full.log
encoding: utf8
file:
class: logging.handlers.TimedRotatingFileHandler
level: WARNING
formatter: detail
when: midnight
backupCount: 7
filename: ./var/log/smarthome.log
loggers:
__main__:
handlers: [file_additional]
level: DEBUG
[code]
Jetzt würde ich erwarten, dass alles, was in smarthome.log auch in smarthome-full.log steht, dass aber ins smarthome.log noch mehr steht.
Dem ist aber nicht so. Folgende Einträge finde ich nur in der smarthome.log, nicht aber in der smarthome-full.log:
Code:
2018-10-02 22:20:23 WARNING __init__ plugins.onewire 1-Wire: problem reading 28.62C41B030000 /bus.1/28.62C41B030000/temperature10: No connection to owserver. -- __init__.py:_sensor_cycle:394 2018-10-02 22:25:23 WARNING __init__ plugins.onewire 1-Wire: problem reading 28.14B51B030000 /bus.0/28.14B51B030000/temperature11: no payload for /uncached/bus.0/28.14B51B030000/temperature11 -- __init__.py:_sensor_cycle:394 2018-10-02 22:25:23 WARNING __init__ plugins.onewire 1-Wire: problem reading 3A.778F07000000 -- __init__.py:_io_cycle:328 2018-10-02 22:25:23 WARNING __init__ plugins.onewire 1-Wire: problem reading 3A.778F07000000 -- __init__.py:_io_cycle:328 2018-10-02 22:25:23 WARNING __init__ plugins.onewire 1-Wire: problem reading 28.62C41B030000 /bus.1/28.62C41B030000/temperature10: No connection to owserver. -- __init__.py:_sensor_cycle:394 2018-10-02 22:30:23 WARNING __init__ plugins.onewire 1-Wire: problem reading 28.14B51B030000 /bus.0/28.14B51B030000/temperature11: no payload for /uncached/bus.0/28.14B51B030000/temperature11 -- __init__.py:_sensor_cycle:394
Gruß,
Hendrik