CakePHP Logs
CakePHP is an open-source web framework that's used to create web applications quickly and easily. Logging activity from CakePHP applications is simple—just use CakePHP's built-in logging class to write your application logs to files. Site24x7 AppLogs natively supports CakePHP logs. Learn more about log management with Site24x7.
Getting started
- Log in to your Site24x7 account.
- Download and install the Site24x7 Server Monitoring agent (Windows | Linux).
- Go to Admin > AppLogs > Log Profile and Add Log Profile.
Log file path
By default, CakePHP writes its log files to this directory:
$app_home/tmp/logs/debug.log
Where $app_home is the root directory of your CakePHP application.
In order to manage and monitor your CakePHP logs with Site24x7, you just need to create a Log Profile and define the Log Type as CakePHP. The default source path is mentioned above. If you're writing in a different path you can also mention the new source path while creating a log profile.
Log pattern
$DateTime:date$ $LogLevel$: $Message$
This is the default pattern defined by Site24x7 to parse CakePHP logs. If you follow a different format, then edit the Log Type and correct the pattern.
Sample log
2018-05-06 11:54:23 Error: Something didn't work!
This log is separated into fields, each of which will take its respective value and will then be uploaded to Site24x7.
Field name | Field value |
DateTime | 2018-05-06 11:54:23 |
LogLevel | INFO |
Message | Something didn't work! |