MemoryLogger class Null safety

Implements a logger which logs to stdout and stores the messages.

Inheritance

Constructors

MemoryLogger([int logLevel = 1])

Properties

countErrors int
@protected, read / write, inherited
errors List<String>
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
logLevel int
read / write, inherited
messages List<String>
getter of _messages
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clear() → void
Removes all entries of _messages
clearErrors() → void
Clears all errors.
inherited
contains(String pattern) bool
Returns whether a given pattern is a part of the strings in _messages. pattern: the string to search
error(String message, {StackTrace? stackTrace}) bool
Logs an error message. message: the error message stackTrace: the stack trace (given by exceptions) return: false (can be used for chaining)
inherited
log(String message, [int level = 1]) bool
Displays the message if logLevel <= level message: message to display level: represent the importance of the message Returns true (for chaining)
override
matches(String regExpr) bool
Returns whether a given regExpr is a part of the strings in _messages. regExpr: the regular expression to search
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
setMaxErrors(int value) → void
Sets the _maxErrors to limit the length of the internal error list.
inherited
setMaxMessages(int max) → void
setter of _maxMessages
toString() String
A string representation of this object. [...]
inherited

Operators

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