Hampel - Monolog Logging Service

Xenforo 2.2.x Addon Nulled Free Hampel - Monolog Logging Service 3.1.1

No permission to download
  • NullScriptz.nl is for SALE!

    More information, please contact: WinSys32

    Buy-Now: $3.000,00
    +/- Unique visitors (Monthly): 10.000+ (Now lower due to inactivity of me) | Average income (Monthly): €100 - €500 + Domain + Server and all files and databases.

  • We are looking for new team members ! Do you think you have it in you, to be a part of an amazing and big community, apply then below on your desired position!
    Become a Uploader! - Become a Moderator
Compatible XF Versions
This XenForo 2.x addon adds logging functionality using the Monolog library from https://github.com/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

1516192724416.png



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:

PHP:
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:

PHP:
$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:

PHP:
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!)

/** @var Monolog\Logger $logger */
$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.
  • Like
Reactions: connect1988
Author
WinSys32
Downloads
1
Views
348
Extention type
zip
File size
203.7 KB
Hash
d8d6fe2d01f49f597011179bed34175b
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from WinSys32

Similar resources

Hampel - CLI Job Runner (XF2.2) WinSys32
Disables the browser triggered job runner and implements a CLI triggered job runner for Unix cron
0.00 star(s) 0 ratings
Downloads
1
Updated
Hampel - Known Bots WinSys32
Adds additional definitions for bot detection in sessions
0.00 star(s) 0 ratings
Downloads
3
Updated
Hampel - What's New DIgest WinSys32
Sends daily, weekly or monthly emails containing highlights of what's new
0.00 star(s) 0 ratings
Downloads
2
Updated
[Hampel] - Private Site WinSys32
This simple addon provides an alternative approach with a cleaner and more elegant outcome.
0.00 star(s) 0 ratings
Downloads
0
Updated
Top Bottom