You are using the documentation for version 2.11.9. Go here for the latest version or check here for your available upgrades to the latest version.
Calling the Logger Class¶
Load the Logger library.
The control panel contains a developer log, which is a log for ExpressionEngine and its third-party developers to bring notices or warnings to the attention of the Super Admin.
Control Panel Location:
For example, EllisLab uses the developer log to warn developers if a core function that is planned to be deprecated is being used by any third-party add-ons.
developer($data[, $update = FALSE[, $expires = 0]])¶
To use the developer log to log your own events, notices or warnings that need to be brought to the attention of the Super Admin, call this method and pass the string of the notice:
- $data (string) – Message to send to the developer log
- $update (boolean) –
TRUEif you want to update a previous message instead of creating a new one. This is good for situations where a notice does not need to be logged each time it’s triggered, but still needs the Super Admin’s attention.
- $expires (integer) – Amount of time where you should only show one meessage. For example, if an item should only show once per week, an item is logged with an expires time of 604800 seconds.
Array of data for the log message
Be conscious of how often the developer() method is used so as not to clutter the developer log and run unnecessary queries.