LogLevel (int)
Less than 1 minute
LogLevel (int)
Enum representing log levels for Warlock logging.
enum LogLevel: intCases
NONE
No logging.
case NONEINFO
Informational messages.
case INFO = 1WARN
Warning messages.
case WARN = 2ERROR
Error messages.
case ERROR = 3NOTICE
Notice messages.
case NOTICE = 4DEBUG
Debug messages.
case DEBUG = 5DECODE
Decode messages.
case DECODE = 6DECODE2
Secondary decode messages.
case DECODE2 = 7Methods
pad
Returns the padding value for to use for the log level.
public pad(): intThis is used to pad the log level name to a fixed width when writing log messages. It is defined here so that it can be easily changed in one place.
color
Applies ANSI coloring to text according to the log level.
public color(string $text): stringParameters
| Parameter | Type | Description |
|---|---|---|
$text | string |
fromString
Parses a level label into a LogLevel enum value.
public fromString(string $level): selfParameters
| Parameter | Type | Description |
|---|---|---|
$level | string |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000