mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 04:08:03 -06:00
fix: Update log consumption
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:developer' as dev;
|
||||||
import 'package:logger/logger.dart';
|
import 'package:logger/logger.dart';
|
||||||
|
|
||||||
final _newLine = Platform.lineTerminator;
|
final _newLine = Platform.lineTerminator;
|
||||||
@@ -50,8 +50,13 @@ class ParsedErrorLogMessage {
|
|||||||
while (!_errorEndPattern.hasMatch(log[currentLine])) {
|
while (!_errorEndPattern.hasMatch(log[currentLine])) {
|
||||||
errorText += log[currentLine] + _newLine;
|
errorText += log[currentLine] + _newLine;
|
||||||
currentLine++;
|
currentLine++;
|
||||||
|
assert(currentLine < log.length, "Error log message is not closed");
|
||||||
}
|
}
|
||||||
currentLine++;
|
currentLine++;
|
||||||
|
// dev.log("Parsing ${currentLine}/${log.length}");
|
||||||
|
if (log.length == currentLine) {
|
||||||
|
return (currentLine, ParsedErrorLogMessage(error: errorText));
|
||||||
|
}
|
||||||
final hasStackTrace = _stackTraceBeginPattern.hasMatch(log[currentLine]);
|
final hasStackTrace = _stackTraceBeginPattern.hasMatch(log[currentLine]);
|
||||||
String? stackTrace;
|
String? stackTrace;
|
||||||
if (hasStackTrace) {
|
if (hasStackTrace) {
|
||||||
|
|||||||
Reference in New Issue
Block a user