class Writer implements Log, LoggerInterface (View source)

Methods

void
__construct(Logger $monolog, Dispatcher $dispatcher = null)

Create a new log writer instance.

void
emergency(string $message, array $context = array())

Log an emergency message to the logs.

void
alert(string $message, array $context = array())

Log an alert message to the logs.

void
critical(string $message, array $context = array())

Log a critical message to the logs.

void
error(string $message, array $context = array())

Log an error message to the logs.

void
warning(string $message, array $context = array())

Log a warning message to the logs.

void
notice(string $message, array $context = array())

Log a notice to the logs.

void
info(string $message, array $context = array())

Log an informational message to the logs.

void
debug(string $message, array $context = array())

Log a debug message to the logs.

void
log(string $level, string $message, array $context = array())

Log a message to the logs.

void
write(string $level, string $message, array $context = array())

Dynamically pass log calls into the writer.

void
useFiles(string $path, string $level = 'debug')

Register a file log handler.

void
useDailyFiles(string $path, int $days, string $level = 'debug')

Register a daily file log handler.

LoggerInterface
useSyslog(string $name = 'laravel', string $level = 'debug')

Register a Syslog handler.

void
useErrorLog(string $level = 'debug', int $messageType = ErrorLogHandler::OPERATING_SYSTEM)

Register an error_log handler.

void
listen(Closure $callback)

Register a new callback handler for when a log event is triggered.

Logger
getMonolog()

Get the underlying Monolog instance.

getEventDispatcher()

Get the event dispatcher instance.

void
setEventDispatcher(Dispatcher $dispatcher)

Set the event dispatcher instance.

Details

at line line 59
void __construct(Logger $monolog, Dispatcher $dispatcher = null)

Create a new log writer instance.

Parameters

Logger $monolog
Dispatcher $dispatcher

Return Value

void

at line line 75
void emergency(string $message, array $context = array())

Log an emergency message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 87
void alert(string $message, array $context = array())

Log an alert message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 99
void critical(string $message, array $context = array())

Log a critical message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 111
void error(string $message, array $context = array())

Log an error message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 123
void warning(string $message, array $context = array())

Log a warning message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 135
void notice(string $message, array $context = array())

Log a notice to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 147
void info(string $message, array $context = array())

Log an informational message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 159
void debug(string $message, array $context = array())

Log a debug message to the logs.

Parameters

string $message
array $context

Return Value

void

at line line 172
void log(string $level, string $message, array $context = array())

Log a message to the logs.

Parameters

string $level
string $message
array $context

Return Value

void

at line line 185
void write(string $level, string $message, array $context = array())

Dynamically pass log calls into the writer.

Parameters

string $level
string $message
array $context

Return Value

void

at line line 212
void useFiles(string $path, string $level = 'debug')

Register a file log handler.

Parameters

string $path
string $level

Return Value

void

at line line 227
void useDailyFiles(string $path, int $days, string $level = 'debug')

Register a daily file log handler.

Parameters

string $path
int $days
string $level

Return Value

void

at line line 243
LoggerInterface useSyslog(string $name = 'laravel', string $level = 'debug')

Register a Syslog handler.

Parameters

string $name
string $level

Return Value

LoggerInterface

at line line 255
void useErrorLog(string $level = 'debug', int $messageType = ErrorLogHandler::OPERATING_SYSTEM)

Register an error_log handler.

Parameters

string $level
int $messageType

Return Value

void

at line line 272
void listen(Closure $callback)

Register a new callback handler for when a log event is triggered.

Parameters

Closure $callback

Return Value

void

Exceptions

RuntimeException

at line line 340
Logger getMonolog()

Get the underlying Monolog instance.

Return Value

Logger

at line line 360
Dispatcher getEventDispatcher()

Get the event dispatcher instance.

Return Value

Dispatcher

at line line 371
void setEventDispatcher(Dispatcher $dispatcher)

Set the event dispatcher instance.

Parameters

Dispatcher $dispatcher

Return Value

void