TLogger constructor
TLogger(})
Constructor for TLogger.
label
- Identifier for the log source.
level
- Minimum level of logs to output.
isEnabled
- Flag to enable or disable logging.
labelColor
- Color code for the label.
labelTimeColor
- Color code for the timestamp.
outputFunction
- Custom function for outputting logs.
Implementation
TLogger(
this.label, {
this.level = LogLevel.debug,
this.isEnabled = true,
String labelColor = "\x1B[35m", // Magenta
String labelTimeColor = "\x1B[34m", // Blue
Function(String)? outputFunction,
}) : _labelColorCode = labelColor,
_labelTimeColorCode = labelTimeColor {
_outputFunction = outputFunction ?? developer.log;
}