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 $blueScreen = null)
No description
log(mixed $message, $priority = self::INFO)
Logs message or exception to file and sends email notification.
string
formatMessage(mixed $message)
No description
string
formatLogLine(mixed $message, $exceptionFile = null)
No description
string
string
logException(Exception|Throwable $exception, $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 39
__construct(string|null $directory, string|array|null $email = null, BlueScreen $blueScreen = null)
No description
at line 54
log(mixed $message, $priority = self::INFO)
Logs message or exception to file and sends email notification.
at line 88
protected string
formatMessage(mixed $message)
No description
at line 112
protected string
formatLogLine(mixed $message, $exceptionFile = null)
No description
at line 152
protected string
logException(Exception|Throwable $exception, $file = null)
Logs exception to the file if file doesn't exist.
at line 165
protected void
sendEmail(mixed $message)
No description
at line 189
void
defaultMailer(mixed $message, string $email)
internal |
Default mailer.