| [ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
This is a simple Logger trait that classes unable to extend AbstractLogger (because they extend another class, etc) can include. It simply delegates all log-level-specific methods to the `log` method to reduce boilerplate code that a simple Logger that does the same thing with messages regardless of the error level has to implement.
| File Size: | 98 lines (3 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| emergency(string|\Stringable $message, array $context = []) X-Ref |
| System is unusable. |
| alert(string|\Stringable $message, array $context = []) X-Ref |
| Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up. |
| critical(string|\Stringable $message, array $context = []) X-Ref |
| Critical conditions. Example: Application component unavailable, unexpected exception. |
| error(string|\Stringable $message, array $context = []) X-Ref |
| Runtime errors that do not require immediate action but should typically be logged and monitored. |
| warning(string|\Stringable $message, array $context = []) X-Ref |
| Exceptional occurrences that are not errors. Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong. |
| notice(string|\Stringable $message, array $context = []) X-Ref |
| Normal but significant events. |
| info(string|\Stringable $message, array $context = []) X-Ref |
| Interesting events. Example: User logs in, SQL logs. |
| debug(string|\Stringable $message, array $context = []) X-Ref |
| Detailed debug information. |
| Generated: Wed Nov 5 05:10:36 2025 | Cross-referenced by PHPXref 0.7.1 |