MonoLog Logs
MonoLog, a PHP library based on the PSR-3 standard, supports various levels of logging for PHP applications. If you're using file handlers to write logs to files, then you can monitor those logs using OpManager Nexus AppLogs. Learn more about log management with OpManager Nexus.
Getting started
- Log in to your OpManager Nexus account.
- Download and install the OpManager Nexus Server Monitoring agent (Windows | Linux).
- Go to Admin > AppLogs > Log Profile and Add Log Profile.
Log file path
To manage your PHP application logs configured with the MonoLog framework, you just need to create a Log Profile and define the Log Type as MonoLog.
The source path is the path configured in your MonoLog logger.
Log pattern
[$DateTime:date$] $Channel$.$LogLevel$: $Message$
This is the default pattern defined by OpManager Nexus to parse MonoLogs. If you follow a different format, then edit the Log Type and correct the pattern.
Sample log
[2018-05-06 11:54:23] default.INFO: This is a log entry!
This log is separated into fields, each of which will take its respective value and be uploaded to OpManager Nexus.
| Field name | Field value |
| DateTime | 2018-05-06 11:54:23 |
| Channel | default |
| LogLevel | INFO |
| Message | This is a log entry! |
Related log types
-
On this page
- Getting started
- Log file path
- Log pattern
- Sample log
- Related log types