hemend_logger library

A Very Good Project created by Very Good CLI.

Classes

AnsiColorStyle
this class abstracts how ansi colors are defined
AnsiConsoleStyle
This is a wrapper around multiple ISelectGraphicRenditions that will combine them into one ISelectGraphicRendition.
AnsiLogger
Ansi logger that prints log records into the console
HemendLogger
A simple implementation of the ILogManager that provides a logging solution for the application using the Logger form logging package
IAnsiColor
this class abstracts how ansi colors are defined
ILogManager
You can find the values for levels in the logging package default level for loggers is INFO which is 800 in integer value The ILogManager abstract class represents an abstraction of a LogManager.
ILogRecorder
The purpose of this abstraction is to define a common interface or contract for different types of log recorders.
ISelectGraphicRendition
this class abstracts how a single SelectGraphicRendition is defined
JsonLogger
The JsonLogger class is a logger that records log messages in JSON format.
Level
Levels to control logging output. Logging can be enabled to include all levels above certain Level. Levels are ordered using an integer value Level.value. The predefined Level constants below are sorted as follows (in descending order): Level.SHOUT, Level.SEVERE, Level.WARNING, Level.INFO, Level.CONFIG, Level.FINE, Level.FINER, Level.FINEST, and Level.ALL.
LogableObject
a mixin that adds logging capabilities to the class
Logger
Use a Logger to log debug messages.
LogRecord
A log entry representation used to propagate information from Logger to individual handlers.
LogRecordEntity
It is used to encapsulate information about a log record, including
RgbAnsiColor
this class abstracts how ansi colors are defined

Enums

AnsiColor
this class abstracts how ansi colors are defined
AnsiColorMode
this class abstracts how ansi colors are defined
AnsiTextEffect
you can find more information at https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters

Mixins

DecoratedPrinter
The DecoratedPrinter mixin extends the functionality of the ILogRecorder interface by adding a decorate method.

Extensions

LoggerTools on Logger
an extension set on Logger

Constants

defaultLevel → const Level
The default Level.

Properties

hierarchicalLoggingEnabled bool
Whether to allow fine-grain logging and configuration of loggers in a hierarchy.
getter/setter pair
recordStackTraceAtLevel Level
Automatically record stack traces for any message of this level or above.
getter/setter pair

Functions

ansiLogMessageColorDecorator({Map<int, AnsiConsoleStyle> colorMap = _defaultColorMapper}) LogDecorator
ansi(console) log color decorator that uses a map of log-level to AnsiColor to print a colored message based on log-level of record
timeLogDecorator({String separator = ' ', Adapter<String, String>? wrapper, Adapter<DateTime, String> formatter = _defaultFormatter}) LogDecorator
A log decorator that add time of the record behind the log-message

Typedefs

Adapter<F, T> = T Function(F)
a method that receives object of type F and turns it into an object of type T
JsonSerializer = Adapter<Map<String, dynamic>, String>
Json Serializer from Map to String
LogDecorator = String Function(String message, LogRecordEntity record)
The decorator function then applies the necessary modifications or enhancements to the log message and returns the decorated message as a String. This allows for customizing the formatting, adding contextual information, or performing any other desired transformations on log messages.
RecordMapper = Adapter<LogRecordEntity, Map<String, dynamic>>
Adapter from LogRecordEntity to Map