====== Log class ======
The log class is used to create different kinds of logs. A log is created like:
$log = new Log('MyLog', array('20', '10r'), 'autodetect');
The first parameter is the log name, which makes up part of the log file name. The next (optional) parameter is the log format, and this indicates that the log should consist of two columns. The first should be 20 characters wide and the next should be 10 characters wide, and right-aligned.
The last parameter indicates if this log should be a global log or an instance log:
^true|The log is in the instance, and placed in the //logs// folder in the instance store.|
^false|The log is global, and placed in the folder defined in the ''$platform_configuration['dir_log']'' variable.|
^'autodetect'|(default) If an instance is active we log here, otherwise we log globally.|
===== Logging =====
Logging is very simple, where one provides a number of parameters matching the column description. If more parameters are added than there is columns, the rest of the information is just appended to the line.
$log->log($username, $event, $log_text);
If no fancy columns are needed the simplest log is:
$log = new Log('quicklog');
$log->log('Some event');