Closed KevinCFechtel closed 8 months ago
Hi, it seems that you are creating a new logger every time you are logging something.
This means a new file handle is created every time you call your logThis
function. This could mess with the file handling of Dart, resulting in race-conditions and other weird behavior, which would explain the broken and missing logs in your file.
Please try making the logger static and re-use it for all your log calls, then test again.
Hi, thank you very much, that was exactly the mistake! The logger is now working correctly.
Hello, I have the problem that the logger unfortunately does not send all log events to the file log output, or that some of them are written broken to the file. The console output works without any problems. As an example I have here the file output and the console output. File output:
Console output:
This is the code that is used for logging: