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. OpManager Nexus AppLogs natively supports CakePHP logs. Learn more about log management with OpManager Nexus.

Getting started

  1. Log in to your OpManager Nexus account.
  2. Download and install the OpManager Nexus Server Monitoring agent (Windows | Linux). 
  3. 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 OpManager Nexus, 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 OpManager Nexus 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 OpManager Nexus.

Field name Field value
DateTime  2018-05-06 11:54:23
LogLevel INFO
Message Something didn't work!
Shortlink has been copied!