Integrate logging system into Flutter app with service registration and testing setup
This commit is contained in:
33
finlog_app/fluttery/lib/logger/logger.dart
Normal file
33
finlog_app/fluttery/lib/logger/logger.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:fluttery/fluttery.dart';
|
||||
import 'package:logging/logging.dart' as lib;
|
||||
|
||||
/// Abstract class for logging service.
|
||||
/// Provides methods for different log levels and configuration.
|
||||
abstract class Logger extends Service {
|
||||
/// Logs an informational message.
|
||||
///
|
||||
/// [message] is the information to log.
|
||||
void info(String message);
|
||||
|
||||
/// Logs a warning message.
|
||||
///
|
||||
/// [message] is the warning to log.
|
||||
void warning(String message);
|
||||
|
||||
/// Logs an error message with optional error and stack trace.
|
||||
///
|
||||
/// [message] is the error message to log.
|
||||
/// [error] is the optional error object associated with this log entry.
|
||||
/// [stackTrace] is the optional stack trace associated with this log entry.
|
||||
void error(String message, [Object? error, StackTrace? stackTrace]);
|
||||
|
||||
/// Logs a debug message.
|
||||
///
|
||||
/// [message] is the debug message to log.
|
||||
void debug(String message);
|
||||
|
||||
/// Sets the log level for the logger.
|
||||
///
|
||||
/// [level] is the new log level to set.
|
||||
void setLogLevel(lib.Level level);
|
||||
}
|
||||
Reference in New Issue
Block a user