Logging

Please note: This page is under construction and has not been finished yet.

Introduction

You can log events to the admin System Logs by using the built in log class. Use the following to retrieve the alerts class object.

$log = e107::getLog();

Logging methods

add()

Parameter

Description

name

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

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');

Logging types

Type

Description

E_LOG_INFORMATIVE

Informational event

E_LOG_NOTICE

Notice event

E_LOG_WARNING

Warning event

E_LOG_FATAL

Fatal event

Last updated