fastlogging
fastlogging copied to clipboard
Output log text file do not tally with console output log
In my console log file, I have:
24.02.21 18:05:51: root: DEBUG : []
24.02.21 18:05:51: root: DEBUG : IP host assigned is 2
24.02.21 18:05:51: root: INFO : Starting execution for 80:cc:9c:95:b5:0c
24.02.21 18:05:52: root: DEBUG : [2]
24.02.21 18:05:52: root: DEBUG : IP host assigned is 3
24.02.21 18:05:52: root: INFO : Starting execution for 80:cc:9c:95:b5:0c
24.02.21 18:06:09: root: INFO : Preparing status updates
24.02.21 18:06:09: root: DEBUG : mac:80:cc:9c:95:b5:0c ip_value:2
24.02.21 18:06:09: root: DEBUG : mac:80:cc:9c:95:b5:0c ip_value:3
24.02.21 18:06:09: root: DEBUG : To be removed from :[['80:cc:9c:95:b5:0c', <Future at 0x7f5a16b4d390 state=finished raised RuntimeError>, 3]]
24.02.21 18:06:09: root: INFO : Status report ready for release
But on my console log, during the same time interval, I have:
24.02.21 18:05:51: root: DEBUG : []
24.02.21 18:05:51: root: DEBUG : IP host assigned is 2
24.02.21 18:05:51: root: INFO : Starting execution of for 80:cc:9c:95:b5:0c
24.02.21 18:05:51: root: INFO : 80:cc:9c:95:b5:0c Startup completed
24.02.21 18:05:51: root: INFO : 80:cc:9c:95:b5:0c Starting up Machine
24.02.21 18:05:51: root: INFO : 80:cc:9c:95:b5:0c Current State: ACTIVE
24.02.21 18:05:51: root: INFO : 80:cc:9c:95:b5:0c Assigning IP Address: 192.168.10.2 subnet mask: 255.255.255.0
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Current State: UPLOAD
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c file requested: firmware
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Start File Transfer
24.02.21 18:05:52: root: DEBUG : [2]
24.02.21 18:05:52: root: DEBUG : IP host assigned is 3
24.02.21 18:05:52: root: INFO : Starting execution for 80:cc:9c:95:b5:0c
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Startup completed
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Starting up Machine
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Current State: ACTIVE
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Assigning IP Address: 192.168.10.3 subnet mask: 255.255.255.0
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Current State: UPLOAD
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c file requested: firmware
24.02.21 18:05:52: root: INFO : 80:cc:9c:95:b5:0c Start File Transfer
24.02.21 18:05:52: root: WARNING: 80:cc:9c:95:b5:0c Retrying
24.02.21 18:05:53: root: WARNING: 80:cc:9c:95:b5:0c Retrying
24.02.21 18:05:53: root: WARNING: 80:cc:9c:95:b5:0c Retrying
24.02.21 18:05:54: root: WARNING: 80:cc:9c:95:b5:0c Retrying
24.02.21 18:05:54: root: ERROR : 80:cc:9c:95:b5:0c File Transfer Failed
24.02.21 18:05:54: root: INFO : 80:cc:9c:95:b5:0c Current State: ACTIVE
24.02.21 18:05:54: root: INFO : 80:cc:9c:95:b5:0c Assigning IP Address: 192.168.10.3 subnet mask: 255.255.255.0
24.02.21 18:05:55: root: ERROR : 80:cc:9c:95:b5:0c Device lost at ACTIVE
24.02.21 18:06:09: root: INFO : Preparing status updates
24.02.21 18:06:09: root: DEBUG : mac:80:cc:9c:95:b5:0c ip_value:2
24.02.21 18:06:09: root: DEBUG : mac:80:cc:9c:95:b5:0c ip_value:3
24.02.21 18:06:09: root: DEBUG : To be removed from:[['80:cc:9c:95:b5:0c', <Future at 0x7f5a16b4d390 state=finished raised RuntimeError>, 3]]
24.02.21 18:06:09: root: INFO : Status report ready for release
Could there be a reason why the logs are not being stored into the file when the program terminates? Is there something preventing the logs from being handled properly by the logging mechanism? For reference, this is a threaded program and I have to stop the program using ctrl+c