MemoryLogger class

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

Inheritance

Constructors

MemoryLogger([int logLevel = 1])

Properties

countErrors int
getter/setter pairinherited
errors List<String>
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
logLevel int
getter/setter pairinherited
messages List<String>
getter of _messages
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent 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