InfobitsLogging class

The main class for handling logs in Logging.

It has to be initialized to start working but when it has been initialized it will catch errors and crashes.

You can also use the static methods to log something manually.

Properties

apiKey String?
final
contextLogs List<Map<String, Object?>>
getter/setter pair
domain String?
final
hashCode int
The hash code for this object.
no setterinherited
includedContextLogs int
final
ingressUrl String
final
isLoggingCollectionEnabled bool
no setter
logsToBeSent List<Map<String, Object?>>
getter/setter pair
maxLogCount int
final
namespace String?
final
onLog → void Function(LoggingLogEvent logEvent)?
final
options LoggingOptions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendInterval Duration
final
sendTimer Timer?
getter/setter pair

Methods

addContextLogs(LoggingLogEvent logEvent) Future<void>
checkForUnsentLogs() Future<bool>
Check for unsent reports
close() → void
Closes the logger and releases all resources.
crash() → void
Crash the app
deleteUnsentLogs() Future<void>
Deletes the unsent logs
didCrashOnPreviousExecution() Future<bool>
Check if the application crashed the last time it was run
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareLogForServer(LoggingLogEvent logEvent) Future<Map<String, Object?>>
queueLogForSending(LoggingLogEvent logEvent) Future<void>
Send log to the server
recordError(dynamic exception, StackTrace? stack, {dynamic reason, Iterable<DiagnosticsNode> information = const [], bool fatal = false}) Future<void>
Record an error and send it to the server
recordFlutterError(FlutterErrorDetails flutterErrorDetails, {bool fatal = false}) Future<void>
Record a flutter error This is used to catch exceptions in the app
recordFlutterFatalError(FlutterErrorDetails flutterErrorDetails) Future<void>
Record a fatal flutter error
recordLog(LoggingLogLevel level, dynamic message, {dynamic exception, String? information, List<LoggingTrace>? stackTrace, bool? printDetails}) Future<void>
Record a log and send it to the server if possible
sendLogs() Future<void>
sendUnsentLogs() Future<void>
Send the unsent logs
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance InfobitsLogging
Gets the instance of Logging
no setter

Static Methods

initialize({String? apiKey, LoggingOptions? options, LoggingOptions optionSelector()?, String ingressUrl = _defaultIngressUrl, void onLog(LoggingLogEvent logEvent)?, Duration sendInterval = const Duration(milliseconds: 100), int maxLogCount = 100, int includedContextLogs = 0, String? domain, String? namespace}) Future<void>
Initialize Logging