clever_logger library
An extendable logger library with colorful prints.
Classes
- CleverLogger
- A logger that prints colorful logs by default.
- CleverPrinter
- A class that formats and prints LogRecords styled in a colorful way.
- ColorfulPrintAction
- A LogAction that prints the received LogRecord to the console using a CleverPrinter.
- EmojiPrinter
- A class that formats and prints LogRecords styled with emojis 🚀.
- 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.
- LogAction
- A abstract class that represents a action taken when a new log record is received.
- Logger
- Use a Logger to log debug messages.
- LogRecord
- A log entry representation used to propagate information from Logger to individual handlers.
Constants
- defaultLevel → const Level
- The default Level.
Properties
- defaultLogger ↔ CleverLogger
-
The default CleverLogger used when calling unnamed functions
like log or logInfo.
latefinal
- 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
-
log(
Object? message, [Level level = Level.FINE]) → void -
Logs a message with the defaultLogger at
level
. -
logConfig(
Object? message) → void - Logs a message with the defaultLogger at Level.CONFIG.
-
logFine(
Object? message) → void - Logs a message with the defaultLogger at Level.FINE.
-
logInfo(
Object? message) → void - Logs a message with the defaultLogger at Level.INFO.
-
logSevere(
Object? message) → void - Logs a message with the defaultLogger at Level.SEVERE.
-
logShout(
Object? message) → void - Logs a message with the defaultLogger at Level.SHOUT.
-
logWarning(
Object? message) → void - Logs a message with the defaultLogger at Level.WARNING.