add b and f also to the log file
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run

This commit is contained in:
otsmr 2026-05-01 13:33:35 +02:00
parent 171a3d7f5e
commit 281014133a
2 changed files with 7 additions and 2 deletions

View file

@ -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()) {

View file

@ -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];