Writer
class Writer (View source)
Properties
protected Logger | $monolog | The Monolog logger instance. | |
protected array | $levels | All of the error levels. | |
protected Dispatcher | $dispatcher | The event dispatcher instance. |
Methods
void | __construct(Logger $monolog, Dispatcher $dispatcher = null) Create a new log writer instance. | |
mixed | callMonolog(string $method, mixed $parameters) Call Monolog with the given method and parameters. | |
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. | |
void | useErrorLog(string $level = 'debug', int $messageType = ErrorLogHandler::OPERATING_SYSTEM) Register an error_log handler. | |
LineFormatter | getDefaultFormatter() Get a default Monolog formatter instance. | |
int | parseLevel(string $level) Parse the string level into a Monolog constant. | |
void | listen(Closure $callback) Register a new callback handler for when a log event is triggered. | |
Logger | getMonolog() Get the underlying Monolog instance. | |
Dispatcher | getEventDispatcher() Get the event dispatcher instance. | |
void | setEventDispatcher(Dispatcher $dispatcher) Set the event dispatcher instance. | |
void | fireLogEvent(string $level, string $message, array $context = array()) Fires a log event. | |
mixed | write() Dynamically pass log calls into the writer. | |
mixed | __call(string $method, mixed $parameters) Dynamically handle error additions. | |
void | formatParameters(mixed $parameters) Format the parameters for the logger. |
Details
void __construct(Logger $monolog, Dispatcher $dispatcher = null)
Create a new log writer instance.
protected mixed callMonolog(string $method, mixed $parameters)
Call Monolog with the given method and parameters.
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.
void useErrorLog(string $level = 'debug', int $messageType = ErrorLogHandler::OPERATING_SYSTEM)
Register an error_log handler.
protected LineFormatter getDefaultFormatter()
Get a default Monolog formatter instance.
protected int parseLevel(string $level)
Parse the string level into a Monolog constant.
void listen(Closure $callback)
Register a new callback handler for when a log event is triggered.
Logger getMonolog()
Get the underlying Monolog instance.
Dispatcher getEventDispatcher()
Get the event dispatcher instance.
void setEventDispatcher(Dispatcher $dispatcher)
Set the event dispatcher instance.
protected void fireLogEvent(string $level, string $message, array $context = array())
Fires a log event.
mixed write()
Dynamically pass log calls into the writer.
mixed __call(string $method, mixed $parameters)
Dynamically handle error additions.
protected void formatParameters(mixed $parameters)
Format the parameters for the logger.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Log/Writer.html