pkglog library

A fundamentally minimalistic package providing logging functions to libraries.

Classes

LevelLogger
Logger for a specific LoggerLevel.
Logger
Main class for logging.
LoggerWithSource
A sub-logger with predefined source and optional message formatting.
LoggerWithSourceAndContext<T extends Object?>
A sub-logger that takes a context and formats the message.
LogLevel
Уровень логирования.
LogLevelAll
LogLevelOff
LogMessage
Context for a log message.
SubLogger
Base class for sub-loggers.

Enums

LoggerLevel
Logger levels.

Typedefs

LogBuilder = String Function(LogMessage context)
Builds a log message.
LogFunction = bool Function(Object? source, Object? message, {Object? error, StackTrace? stackTrace})
LoggerWithSourceAndContextFunction<T extends Object?> = bool Function(T context, Object? message, {Object? error, StackTrace? stackTrace})
Function type for sub-loggers with context.
LoggerWithSourceFunction = bool Function(Object? message, {Object? error, StackTrace? stackTrace})
Function type for sub-loggers with source.
LogPrinter = void Function(String text)
Prints a log message.

Exceptions / Errors

LogError
An error and a stack trace.