Download the PHP package azay/json-logger without Composer
On this page you can find all versions of the php package azay/json-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package json-logger
One of the simplest implementations PSR-3 compatible logger
Requirements
- PHP 7 or greater
- Json extension
Feature
- JSON output format
Installation
Installation is possible using Composer.
Basic usage
Log levels
Logger supports the logging levels described by RFC 5424.
Level | Severity | Description | Name in Logger | Constant in Logger |
---|---|---|---|---|
0 | Emergency | system is unusable | emergency |
EMERGENCY |
1 | Alert | action must be taken immediately | alert |
ALERT |
2 | Critical | critical conditions | critical |
CRITICAL |
3 | Error | error conditions | error |
ERROR |
4 | Warning | warning conditions | warning |
WARNING |
5 | Notice | normal but significant condition | notice |
NOTICE |
6 | Informational | informational messages | info |
INFO |
7 (default) | Debug | debug-level messages | debug |
DEBUG |
Set logging level for your app
Break Lines
Timestamp format
Flat mode
If "Flat Mode" is enabled, all contextual data is recorded at the same level. Otherwise, the contextual data is inserted as it is.
Example #1
Output
file logger.json
Example #2
Output
file logger.json
All versions of json-logger with dependencies
PHP Build Version
Package Version
The package azay/json-logger contains the following files
Loading the files please wait ....