Loggy<T extends LoggyType> class

Use a Loggy to log debug messages.

Loggys are named using a hierarchical dot-separated name convention, and their types are used to _whitelist or _blacklist specific logger types. Loggy can be any type so end user can have as many or as little different Loggy types as they want.

Constructors

Loggy(String name)
Singleton constructor. Calling new Loggy(name) will return the same actual instance whenever it is called with the same string name.
factory
Loggy.detached(String name)
Creates a new detached Loggy.
factory

Properties

children Map<String, Loggy<LoggyType>>
Children in the hierarchy of loggers, indexed by their simple names.
final
filters List<LoggyFilter>
Put logger types on whitelist. This will only send logs from passed types
no getter
fullName String
The full name of this logger, which includes the parent's full name.
no setter
hashCode int
The hash code for this object.
no setterinherited
level LogOptions
Effective level considering the levels established in this logger's parents (when hierarchicalLoggingEnabled is true).
getter/setter pair
name String
Simple name of this logger.
final
parent Loggy<LoggyType>?
no setter
printer LoggyPrinter?
Set custom printer on logger.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearListeners() → void
debug(dynamic message, [Object? error, StackTrace? stackTrace]) → void
error(dynamic message, [Object? error, StackTrace? stackTrace]) → void
info(dynamic message, [Object? error, StackTrace? stackTrace]) → void
log(LogLevel logLevel, dynamic message, [Object? error, StackTrace? stackTrace, Zone? zone, Frame? callerFrame]) → void
Adds a log record for a message at a particular logLevel if isLoggable(logLevel) is true.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
warning(dynamic message, [Object? error, StackTrace? stackTrace]) → void

Operators

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

Static Properties

currentPrinter LoggyPrinter?
no setter

Static Methods

initLoggy({LoggyPrinter logPrinter = const DefaultPrinter(), LogOptions logOptions = defaultLevel, List<LoggyFilter> filters = const [], bool hierarchicalLogging = false}) → void