As the name says, it is made to be basic and direct.
Log Class Describes a logger instance.
The message MUST be a string or object implementing __toString().
The message MAY contain placeholders in the form: {foo} where foo will be replaced by the context data in key “foo”. The context array can contain arbitrary data, the only assumption that can be made by implementors is that if an Exception instance is given to produce a stack trace, it MUST be in a key named “exception”. See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md for the full interface specification.
Psr\Log\LoggerInterface
Name | Description |
---|---|
__construct | Function __construct |
alert | Function alert |
Action must be taken immediately. | |
critical | Function critical |
Critical conditions. | |
debug | Funtion debug |
Detailed debug information | |
emergency | Function emergency |
System is unusable. | |
error | Function error |
Runtime errors that do not require immediate action but should typically be logged and monitored. | |
formatMessage | Function formatMessage |
Format Message to file log line | |
formatMessageToArray | Function formatMessageToArray |
Format Message line, and return this as array | |
getByDate | Function getByDate |
Get a log file by string date and return a array with contents | |
info | Function info |
Interesting events. | |
interpolate | Function interpolate |
Interpolates context values into the message placeholders. | |
log | Function log |
Logs with an arbitrary level. | |
notice | Function notice |
Normal but significant events | |
warning | Function warning |
Exceptional occurrences that are not errors. |
Description
public __construct (string $path, string $email)
Function __construct
Parameters
(string) $path
(string) $email
Return Values
void
Description
public alert (string $message, array $context)
Function alert Action must be taken immediately.
Parameters
(string) $message
(array) $context
Return Values
void
Description
public critical (string $message, array $context)
Function critical Critical conditions.
Parameters
(string) $message
(array) $context
Return Values
void
Description
public debug (string $message, array $context)
Funtion debug Detailed debug information
Parameters
(string) $message
(array) $context
Return Values
void
Description
public emergency (string $message, array $context)
Function emergency System is unusable.
Parameters
(string) $message
(array) $context
Return Values
void
Description
public error (string $message, array $context)
Function error Runtime errors that do not require immediate action but should typically be logged and monitored.
Parameters
(string) $message
(array) $context
Return Values
void
Description
public formatMessage (string $level, string $message, string $date_format, string $format)
Function formatMessage Format Message to file log line
Parameters
(string) $level
(string) $message
(string) $date_format
(string) $format
Return Values
string
Description
public formatMessageToArray (string $level, string $message, string $date_format)
Function formatMessageToArray Format Message line, and return this as array
[
"date" => Y/m/d H:i:s,
"level" => "Level",
"message" => "Text Message interpolated.",
"context" => array()
];
Parameters
(string) $level
(string) $message
(string) $date_format
Return Values
string
Description
public getByDate (string $date)
Function getByDate Get a log file by string date and return a array with contents
Parameters
(string) $date
Return Values
array|null
Description
public info (string $message, array $context)
Function info Interesting events.
Parameters
(string) $message
(array) $context
Return Values
void
Description
public interpolate (string $message, array $context)
Function interpolate Interpolates context values into the message placeholders.
Parameters
(string) $message
(array) $context
Return Values
string
Description
public log (mixed $level, string $message, array $context)
Function log Logs with an arbitrary level.
Parameters
(mixed) $level
(string) $message
(array) $context
Return Values
void
Description
public notice (string $message, array $context)
Function notice Normal but significant events
Parameters
(string) $message
(array) $context
Return Values
void
Description
public warning (string $message, array $context)
Function warning Exceptional occurrences that are not errors.
Parameters
(string) $message
(array) $context
Return Values
void