Logger 13.12.18.001

Logger for Vanilla

<

div>You can find more free plugins on my website: Free Vanilla Forums plugins.

Description

This plugin adds logging capabilities to Vanilla. It has been designed to allow 3rd party plugins to easily log messages to one or multiple destinations, by leveraging the flexibility of Apache Log4php.

This Logger implements all the features of the former Advanced Logger, with the exception of the GUI, which has been permanently removed as it increased complexity without adding much benefit.

For more details, please refer to the README.md file included with the plugin.

Supported appenders

The plugin supports all appenders provided by Log4php and adds a couple more, for your convenience, listed below.

  • LoggerAppenderVanillaDB
  • LoggerAppenderGraylog2
  • LoggerAppenderLoggly
  • LoggerAppenderLogglySyslog
  • LoggerAppenderRSyslog

Usage

Using Logger Plugin is extremely easy, all it takes are two lines of code:

// Get the Logger instance
$Logger = LoggerPlugin::GetLogger();

// Log several messages, one for each available level
$Logger->trace('This is a TRACE message');
$Logger->debug('This is a DEBUG message');
$Logger->info('This is an INFO message');
$Logger->warn('This is an WARNING message');
$Logger->error('This is an ERROR message');
$Logger->fatal('This is an FATAL message');

Requirements

  • PHP 5.3+
  • Vanilla Forums 2.0

Feel free to contribute on Github: [email protected]:daigo75/vanilla-logger.git

Questions