immich/mobile-v2/lib/utils/mixins/log_context.mixin.dart
shenlong-tanwen 11cef4ec9a 🚀
2025-02-26 08:58:18 +05:30

15 lines
346 B
Dart

import 'package:flutter/foundation.dart';
import 'package:logging/logging.dart';
mixin LogContext {
late final String ctx = logContext;
/// Context name of the log message
/// Override this to provide a custom name
String get logContext => runtimeType.toString();
@protected
@nonVirtual
Logger get log => Logger.detached(ctx);
}