Made the logger an object to be multiprocessing compatible.

The initialization of the Configuration() object can not log anymore since the Log() object initialization requires the Configuration(). Maybe I will find a better solution in the future. For now, it fixes bugs and makes my life easier.
This commit is contained in:
Johannes Findeisen 2022-10-11 02:57:13 +02:00
commit e5cc2a4596
19 changed files with 201 additions and 211 deletions

View file

@ -9,7 +9,7 @@ log_file = ~/code/linspector/linspector/log/linspector.log
; the size of the log file higher to increase the log history.
log_file_count = 10
; log file size in megabytes as int. the default is 10000000 bytes (10MiB) set in the code if not configured here.
log_file_size = 5
log_file_size = 1
; log file size in bytes as int. you can set to bytes if you want to set a value lower then 1 megabyte. but it will
; only be used when log_file_size is not set. if this value is not set too the default in the code will be used.
log_file_size_bytes = 100000
@ -35,7 +35,7 @@ start_scheduler = true
; explain this.... :) default is "thread" but Linspector will only run on one CPU core then. default threads are 1024
; but this can be set much higher here. this should be minimal set to the number of monitors you are running. in process
; mode log rotating is not working as expected so i need to investigate some time to figure out what happens.
scheduler_mode = thread
scheduler_mode = process
; the default job interval can be set here. in the code 300 seconds are set when this option does not exist here nor in
; the monitor configuration.
default_interval = 5