| Fully Qualified Name: | CodeIgniter\Log\Logger |
| Implements: | LoggerInterface |
The CodeIgntier Logger
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".
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor. | Logger |
| alert() | Action must be taken immediately. | Logger |
| critical() | Critical conditions. | Logger |
| debug() | Detailed debug information. | Logger |
| determineFile() | Determines the file and line that the logging call was made from by analyzing the backtrace. | Logger |
| emergency() | System is unusable. | Logger |
| error() | Runtime errors that do not require immediate action but should typically be logged and monitored. | Logger |
| info() | Interesting events. | Logger |
| log() | Logs with an arbitrary level. | Logger |
| notice() | Normal but significant events. | Logger |
| warning() | Exceptional occurrences that are not errors. | Logger |
Constructor.
| Parameter Name | Type | Description |
|---|---|---|
| $config | \Config\Logger | |
| $debug | bool |
Returns:
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Critical conditions.
Example: Application component unavailable, unexpected exception.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Detailed debug information.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Determines the file and line that the logging call was made from by analyzing the backtrace.
Find the earliest stack frame that is part of our logging system.
Returns: array
System is unusable.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Runtime errors that do not require immediate action but should typically be logged and monitored.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Interesting events.
Example: User logs in, SQL logs.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Logs with an arbitrary level.
| Parameter Name | Type | Description |
|---|---|---|
| $level | mixed | |
| $message | string | |
| $context | array |
Returns: bool
Normal but significant events.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool