class Logger implements ILogger

Logger.

Properties

string $directory
string|array $email
string $fromEmail
mixed $emailSnooze
callable $mailer

Methods

__construct($directory, $email = NULL, BlueScreen $blueScreen = NULL)

No description

log($message, $priority = self::INFO)

Logs message or exception to file and sends email notification.

string
formatMessage($message)

No description

string
formatLogLine($message, $exceptionFile = NULL)

No description

string
getExceptionFile($exception)

No description

string
logException($exception, $file = NULL)

Logs exception to the file if file doesn't exist.

void
sendEmail($message)

No description

void
defaultMailer($message, $email)

Default mailer.

Details

at line 35
__construct($directory, $email = NULL, BlueScreen $blueScreen = NULL)

No description

Parameters

$directory
$email
BlueScreen $blueScreen

at line 50
log($message, $priority = self::INFO)

Logs message or exception to file and sends email notification.

Parameters

$message
$priority

at line 84
protected string formatMessage($message)

No description

Parameters

$message

Return Value

string

at line 108
protected string formatLogLine($message, $exceptionFile = NULL)

No description

Parameters

$message
$exceptionFile

Return Value

string

at line 123
string getExceptionFile($exception)

No description

Parameters

$exception

Return Value

string

at line 141
protected string logException($exception, $file = NULL)

Logs exception to the file if file doesn't exist.

Parameters

$exception
$file

Return Value

string

logged error filename

at line 161
protected void sendEmail($message)

No description

Parameters

$message

Return Value

void

at line 183
void defaultMailer($message, $email)

internal  
 

Default mailer.

Parameters

$message
$email

Return Value

void