Moin,
dass ich mit der neuen Logging-Konfiguration nicht warm werde, ist eine Sache - aber sie macht es mir auch nicht einfach.
Ich möchte:
"Standard"-Log WARN+ in Datei smarthome-warn.log
alles DEBUG+ in Datei smarthome.log
NUR plugin.kodi debug auf smarthome-kodi.log und Konsole -> insbesondere keine DEBUG-Ausgaben vom http-Modul!
um die Module "einzufangen", habe ich die ausschließlich auf smarthome-http.log geleitet - dachte ich.
meine logging.yaml:
Ergebnis: Konsole voll mit DEBUG vom http-Modul. Kann man das nicht abstellen?
dass ich mit der neuen Logging-Konfiguration nicht warm werde, ist eine Sache - aber sie macht es mir auch nicht einfach.
Ich möchte:
"Standard"-Log WARN+ in Datei smarthome-warn.log
alles DEBUG+ in Datei smarthome.log
NUR plugin.kodi debug auf smarthome-kodi.log und Konsole -> insbesondere keine DEBUG-Ausgaben vom http-Modul!
um die Module "einzufangen", habe ich die ausschließlich auf smarthome-http.log geleitet - dachte ich.
meine logging.yaml:
Code:
%YAML 1.1
# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab
---
version: 1
disable_existing_loggers: true
formatters:
simple:
format: '%(asctime)s %(levelname)-8s %(threadName)-12s %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
detail:
format: '%(asctime)s %(levelname)-8s %(module)-12s %(threadName)-12s %(message)s -- %(filename)s:%(funcName)s:%(lineno)d'
datefmt: '%Y-%m-%d %H:%M:%S'
handlers:
console:
class: logging.StreamHandler
formatter: simple
stream: ext://sys.stdout
file_kodi:
class: logging.handlers.TimedRotatingFileHandler
level: DEBUG
formatter: simple
when: midnight
backupCount: 7
filename: ./smarthome-kodi.log
file:
class: logging.handlers.TimedRotatingFileHandler
level: WARN
formatter: detail
when: midnight
backupCount: 7
filename: ./smarthome-warn.log
file_debug:
class: logging.handlers.TimedRotatingFileHandler
level: DEBUG
formatter: detail
when: midnight
backupCount: 7
filename: ./smarthome.log
file_http:
class: logging.handlers.TimedRotatingFileHandler
level: DEBUG
formatter: detail
when: midnight
backupCount: 7
filename: ./var/log/http.log
loggers:
plugins.kodi:
handlers: [console, file_kodi]
modules.admin:
handlers: [file_http]
level: WARN
modules.http:
handlers: [file_http]
level: WARN
root:
level: DEBUG
handlers: [file]



Kommentar