Logger
class Logger implements ILogger
Logger.
Properties
string|null | $directory | ||
string|array|null | |||
string|null | $fromEmail | ||
mixed | $emailSnooze | ||
callable | $mailer |
Methods
__construct(string|null $directory, string|array|null $email = null, BlueScreen|null $blueScreen = null)
No description
log(mixed $message, $level = self::INFO)
Logs message or exception to file and sends email notification.
static string
formatMessage(mixed $message)
No description
static string
formatLogLine(mixed $message, string|null $exceptionFile = null)
No description
string
string
logException(Throwable $exception, string|null $file = null)
Logs exception to the file if file doesn't exist.
void
sendEmail(mixed $message)
No description
void
defaultMailer(mixed $message, string $email)
Default mailer.
Details
at line 40
__construct(string|null $directory, string|array|null $email = null, BlueScreen|null $blueScreen = null)
No description
at line 55
log(mixed $message, $level = self::INFO)
Logs message or exception to file and sends email notification.
at line 88
static string
formatMessage(mixed $message)
No description
at line 111
static string
formatLogLine(mixed $message, string|null $exceptionFile = null)
No description
at line 122
string
getExceptionFile(Throwable $exception, string $level = self::EXCEPTION)
No description
at line 150
protected string
logException(Throwable $exception, string|null $file = null)
Logs exception to the file if file doesn't exist.
at line 162
protected void
sendEmail(mixed $message)
No description
at line 184
void
defaultMailer(mixed $message, string $email)
internal |
Default mailer.