надеюсь будет работать сукi
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user