simc / logger

Small, easy to use and extensible logger which prints beautiful logs.
https://pub.dev/packages/logger
MIT License
1.07k stars 129 forks source link

File output fails within Workmanager task handler #92

Open IanWorthington opened 3 years ago

IanWorthington commented 3 years ago

I have a callback invoked by Workmanager. Although Console output works fine from here, I have to reinitialise the file for the File Output at the start of the callback, which I guess makes sense.

However once I start processing within the Workmanager.executeTask() task handler, although I still get the console output fine, I get nothing written to the File output. I've even tried reinitialising to a third file here, without any success. There's no errors on the console.

Any ideas how I might fix this?

Notes: Maybe caused by IOSink close/await done missing or faulty when called in task handler?

knvpk commented 3 years ago

@IanWorthington , Did you find the fix, im also facing same problem.

IanWorthington commented 3 years ago

@IanWorthington , Did you find the fix, im also facing same problem.

I'm afraid not. I've had to stop using logger for the moment, but I hope to come back to it at some stage.