Using e107's built-in classes and methods.

Logging

You can log events to the admin system logs by using the built in log class.

$log = e107::getLog();

add()

name a title or name for the log event.
details details for the log event - can be either a string of text or an array.
type the type of event. (see table below)
code is a custom reference code for your type of event. It should be short, ALL CAPITALS and not contain spaces.

$log = e107::getLog();
$log->add(name, details, type, code);

//Example: 
$log->add('My Event Name', $myDetailedData, E_LOG_INFORMATIVE, 'MYCODE');


Type Description
E_LOG_INFORMATIVE Informational event
E_LOG_NOTICE Notice event
E_LOG_WARNING Warning event
E_LOG_FATAL Fatal event


Thursday 13 June 2013 - 00:00:00 Cameron,

Social Links