надеюсь будет работать сукi

This commit is contained in:
Jganenokk
2026-07-05 23:43:15 +07:00
parent 7ce7cf7a1d
commit 815e41648a
10 changed files with 419 additions and 117 deletions
+12 -1
View File
@@ -3,6 +3,8 @@ import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:logger/logger.dart';
import 'debug_session_log.dart';
Level _minimumLogLevel() {
const raw = String.fromEnvironment('KOMET_LOG_LEVEL', defaultValue: '');
switch (raw.toLowerCase()) {
@@ -41,9 +43,18 @@ final logger = Logger(
filter: _logFilter(),
level: _minimumLogLevel(),
printer: KometLogPrinter(),
output: ConsoleOutput(),
output: MultiOutput([ConsoleOutput(), DebugSessionLogOutput()]),
);
class DebugSessionLogOutput extends LogOutput {
@override
void output(OutputEvent event) {
for (final line in event.lines) {
DebugSessionLog.instance.recordLogLine(line);
}
}
}
int _importanceSortKey(Level level) {
final v = level.value;
if (v >= 5999) {