debugging work

This commit is contained in:
Christien Rioux 2025-03-22 21:43:37 -04:00
parent 739df7c427
commit d6b1c20906
71 changed files with 4155 additions and 3616 deletions

View file

@ -8,6 +8,7 @@ import 'package:intl/intl.dart';
import 'package:loggy/loggy.dart';
import 'package:veilid_support/veilid_support.dart';
import '../proto/proto.dart';
import '../veilid_processor/views/developer.dart';
import 'state_logger.dart';
@ -121,6 +122,7 @@ class CallbackPrinter extends LoggyPrinter {
callback?.call(record);
}
// Change callback function
// ignore: use_setters_to_change_properties
void setCallback(void Function(LogRecord)? cb) {
callback = cb;
@ -147,6 +149,7 @@ void initLoggy() {
logOptions: getLogOptions(null),
);
// Allow trace logging from the command line
// ignore: do_not_use_environment
const isTrace = String.fromEnvironment('LOG_TRACE') != '';
LogLevel logLevel;
@ -159,5 +162,8 @@ void initLoggy() {
Loggy('').level = getLogOptions(logLevel);
// Create state logger
registerVeilidProtoToDebug();
registerVeilidDHTProtoToDebug();
registerVeilidchatProtoToDebug();
Bloc.observer = const StateLogger();
}