We noticed you’re using an ad blocker!

Dear Guest, We’ve detected that you are using adblock plus, uBlock Origin, AdGuard or some other adblocking software which is preventing the page from fully loading :(

We don’t have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads! We need money to operate the site, and almost all of it comes from our online advertising.

Please Disable Ad-blocker and Click on X or Refresh Page.

  • Note: don´t push posting-counter with messages like thx, good, haha, only use reactions! threads will be deleted without any comment or notification. Read Rules.
  • Note: All new memeber's needs minimum 10 good posts for download files.. Read More!
Ali Raza

Monolog Logging Service 3.1.0

No permission to download
Compatible XF Versions 2.x
2.1
Visible branding
No
This XenForo 2.0 addon adds logging functionality using the Monolog library from Seldaek/monolog

Features
  • Log to a file
  • Send logs via email
  • Emailed logs are deduplicated and buffered
  • Configure minimum logging levels for files vs email logging
  • Add extra visitor data to logs: user_id and username
  • Add extra web data to logs: current request URI, request method and client IP
  • Test tool included to verify that logs are being written to disk - go to AdminCP > Tools > Checks and tests > Test Monolog

proxy.php?image=https%3A%2F%2Fxenforo.com%2Fcommunity%2Fattachments%2F1516192724416-png.166815%2F&hash=1c3e2c52f2bd57700eff88ab4a12165e


Usage Instructions

By default, this addon will log events to a file called internal_data/monolog.log - this is configurable.

To use the default logging facility, do the following in your addon code:


use Monolog\Helper\Log;
Log::info('an info message', ['context' => 'foo']);
Log::error('an error message', ['data' => 'bar']);

However, it is recommended that you create your own channel for your addon to make it easier to filter log entries:


$logger = \XF::app()->get('monolog')->newChannel('myaddon');
$logger->warning('a warning message', ['context' => 'foo']);

Refer to the documentation for more detailed usage instructions for Monolog.

You can create your own handler stack to customise how things are logged:


use Monolog\Logger;

$monolog = \XF::app()->get('monolog');
$streamhandler = $monolog->stream(); // return our default stream handler for logging to a file
//(or create your own!)


$logger = $monolog->logger('myaddon');
$logger->pushHandler($streamhandler); // push our stream handler onto the handler stack
// you can apply any other customisations you like here as well by adding custom handlers, formatters or processors

$logger->critical('a critical message', ['context' => 'foo']);

Refer to Handlers, Formatters and Processors for more information.
Author
Ali Raza
Downloads
2
Views
101
First release
Last update
Rating
4.00 star(s) 1 ratings

More resources from Ali Raza

Latest updates

  1. v3.1.0 updates

    updates for XF 2.1
Top

AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock
Hello! It seems that you are using AdBlock - some functions may not be available. Please add us as exceptions. Thank you for understanding!