e107 Developer Guide
  • Welcome
  • Getting Started
    • Hello world example
    • Folder structure
    • Database structure
    • Debugging & problem solving
  • Classes and methods
    • Introduction
    • Alerts
    • Cache
    • CSS
    • Database
    • Date
    • Events
    • Forms
    • Javascript
    • Language
    • Logging
    • Meta
    • Parser
    • Plugins
    • Preferences
    • Redirection
    • Render
    • Route
    • URLs
    • User Data
  • Plugin development
    • Introduction
    • Plugin Builder
    • Admin-UI (User Interface)
    • Installation & configuration
    • Plugin shortcodes
    • Internationalisation (LAN)
    • Extending core functionality (addons)
    • Upgrading legacy plugins
  • Theme development
    • Introduction
    • Installation & configuration
    • Layout & templates
    • Theme Shortcodes
    • Styling (CSS)
    • Upgrading legacy themes
  • Templates, shortcodes & constants
    • Introduction
    • Templates
    • Shortcodes
    • Core Shortcodes
    • Constants
  • How-to's / FAQs
    • How to...
Powered by GitBook
On this page
  • Introduction
  • Logging methods
  • add()
  • Logging types

Was this helpful?

Export as PDF
  1. Classes and methods

Logging

PreviousLanguageNextMeta

Last updated 4 years ago

Was this helpful?

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

Introduction

You can log events to the admin 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

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

The type of event. ()

System Logs
see table below