mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-24 23:52:11 +00:00
add b and f also to the log file
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
171a3d7f5e
commit
281014133a
2 changed files with 7 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ Future<void> _writeLogToFile(LogRecord record) async {
|
|||
final logFile = File('${AppEnvironment.supportDir}/app.log');
|
||||
|
||||
final logMessage =
|
||||
'${clock.now().toString().split(".")[0]} ${record.level.name} [twonly] ${record.loggerName} > ${record.message}\n';
|
||||
'${clock.now().toString().split(".")[0]} ${record.level.name} [${AppState.isInBackgroundTask ? 'b' : 'f'}] [twonly] ${record.loggerName} > ${record.message}\n';
|
||||
|
||||
return _protectFileAccess(() async {
|
||||
if (!logFile.existsSync()) {
|
||||
|
|
|
|||
|
|
@ -318,7 +318,12 @@ class _LogEntry {
|
|||
}
|
||||
}
|
||||
|
||||
msg = msg.trim().replaceAll('[twonly] ', '');
|
||||
msg = msg
|
||||
.trim()
|
||||
.replaceAll('[twonly] ', '')
|
||||
.replaceAll('[f] ', '')
|
||||
.replaceAll('[b] ', '');
|
||||
|
||||
final fileNameS = msg.split(' > ');
|
||||
final fileName = fileNameS[0];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue