Write

Navigation:  Development > Function Reference > Helpers > Log >

Write

Previous pageReturn to chapter overviewNext page

This function used to write log.

 

This is minimum parameter of function.

 

App::Helper('Log')->Write('Test log');

 

 

Advanced example:
 
App::Helper('Log')
   ->setFkey(15) // Set user id
   ->setLogType('System') // Log type
   ->Write('Test log');

 

 

By default all log set in text format. If we set log type 'Query then log save in database. See bellow example:

 

App::Helper('Log')
    ->setFkey(32)
    ->setLogType('Query')
    ->Write('Test log');