Closed azlekov closed 4 months ago
Hi, your snippet only logs to file if the Flutter app runs at least in profile or release mode, however, the default DevelopmentFilter
only logs in debug mode.
Therefore, your log file was probably empty while running in release mode.
I modified your snippet and either removed the kDebugMode
check or set a filter that logs in release mode (e.g. ProductionFilter
), and besides that, everything worked for me.
Tested on Windows 11 23H2.
Hello, I'm trying to save log files on Windows. The files are created, but the logs are empty. On macOS the same code is working as expected.
Here is how I'm configuring the logger:
Also I tried to "flush" the logs by calling
logger.close()
on app exit, again without any success.Is there something wrong I'm doing?