smarthomeNG / smarthome

Device integration platform for your smart home
https://www.smarthomeNG.de
GNU General Public License v3.0
119 stars 92 forks source link

lib.log: introduce a new rotating filehandler #613

Closed onkelandy closed 5 months ago

onkelandy commented 6 months ago

considering current date and time as filenames. IMPORTANT: docu needs to be updated for the operationlog and datalog plugin

Ways to test:

handlers:
    datetime_file1:
        (): lib.log.DateTimeRotatingFileHandler
        formatter: shng_detail
        when: 'M'
        interval: 1
        backupCount: 2
        filename: ./var/log/testlog.log
        encoding: utf8
    datetime_file2:
        (): lib.log.DateTimeRotatingFileHandler
        formatter: shng_detail
        when: 'M'
        interval: 1
        backupCount: 5
        filename: /{year}/test-{year:02}-{month}-{day}-{hour:02}.{minute:02}
        encoding: utf8