Showing posts with label log. Show all posts
Showing posts with label log. Show all posts

Friday, 3 January 2020

Cakephp write custom log


Code:

CakeLog::config('customlog', array(

 'engine' => 'File',

 'path' => WWW_ROOT.'files/log/'

));


customlog - Logname


path - Yourself to set customize whatever you need



Code:


CakeLog::write('customlog', 'Log data');

Wednesday, 23 May 2018

How to create custom log in cakephp?

1. Add bootstrap for this in below

CakeLog::config('customlog', array('engine' => 'File'));

2. Create log message in custom logfile

CakeLog::write('customlog', 'myArray');

Check now you log directory once created