CrashlyticsPrinter class
LogPrinter for crashlytics.
Calls onLog when there is a log message, and calls onError when there is an error. Logs above errorLevel will be sent as error logs. CrashlyticsLogEvent.message of onLog looks like this:
💡 [INFO] demo (file:///your/file/path/roggle/example/main.dart:16:10): Log message
- Inheritance
-
- Object
- LogPrinter
- SinglePrettyPrinter
- CrashlyticsPrinter
Constructors
-
CrashlyticsPrinter({required Level errorLevel, required CrashlyticsErrorCallback onError, CrashlyticsLogCallback? onLog, String? loggerName, bool printCaller = true, bool printFunctionName = true, bool printLocation = true, bool printEmojis = true, bool printLabels = true, Map<
Level, String> levelEmojis = defaultLevelEmojis, Map<Level, String> levelLabels = defaultLevelLabels})
Properties
- colors → bool
-
If set to true, the log will be colorful.
finalinherited
- errorLevel → Level
-
The current logging level to send error.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
levelEmojis
→ Map<
Level, String> -
Emoji for each log level.
finalinherited
-
levelLabels
→ Map<
Level, String> -
String for each log level.
finalinherited
- loggerName → String?
-
If specified, it will be output at the beginning of the log.
finalinherited
- onError → CrashlyticsErrorCallback
-
Callback called when an error occurs
final
- onLog → CrashlyticsLogCallback?
-
Callback called when printing a log message
final
- printCaller → bool
-
If set to true, caller will be output to the log.
finalinherited
- printEmojis → bool
-
If set to true, the emoji will be output to the log.
finalinherited
- printFunctionName → bool
-
If set to true, function name of caller will be output to the log.
finalinherited
- printLabels → bool
-
If set to true, the log level string will be output to the log.
finalinherited
- printLocation → bool
-
If set to true, location of caller will be output to the log.
finalinherited
- printTime → bool
-
If set to true, the time stamp will be output to the log.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTraceLevel → Level
-
The current logging level to display stack trace.
finalinherited
- stackTraceMethodCount → int?
-
Number of stack trace methods to display.
finalinherited
- stackTracePrefix → String
-
Stack trace prefix.
finalinherited
- timeFormatter → TimeFormatter
-
Formats the current time.
finalinherited
Methods
-
convertToCallerString(
Frame frame, {bool printFunctionName = true, bool printLocation = true}) → String? -
inherited
-
destroy(
) → Future< void> -
inherited
-
formatFixed(
{required Level level, required DateTime time}) → String -
inherited
-
getCaller(
{StackTrace? stackTrace}) → String? -
inherited
-
getLevelColor(
Level level) → AnsiColor -
inherited
-
getStackTrace(
{StackTrace? stackTrace}) → List< String> -
inherited
-
init(
) → Future< void> -
inherited
-
log(
LogEvent event) → List< String> -
Is called every time a new LogEvent is sent and handles printing or
storing the message.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stringifyMessage(
dynamic message) → String -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited