forked from puarudz/WHMCS-7.8.0-decoded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist.loghandler.php
executable file
·51 lines (49 loc) · 1.56 KB
/
dist.loghandler.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/*
* @ PHP 5.6
* @ Decoder version : 1.0.0.1
* @ Release on : 24.03.2018
* @ Website : http://EasyToYou.eu
*/
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\ErrorLogHandler;
use Monolog\Logger;
/**
* dist.loghandler.php
*
****************************
** DO NOT EDIT THIS FILE! **
****************************
*
* You are free to copy this file as "loghandler.php" and make any
* modification you need. This allows you to make customization that will not
* be overwritten during an update.
*
* WHMCS will attempt to load your custom "loghandler.php" instead of this
* file ("dist.loghandler.php").
*
****************************
** DO NOT EDIT THIS FILE! **
****************************
*
* The WHMCS initializes a Monolog logger, exposing the handler for customization.
*
* You are free to customize the handlers by modify this file to your needs.
*
* By default, WHMCS will log all messages to the configured PHP error log
* (i.e., the Apache webserver error log).
*
* NOTE:
* * The applications handler by default, as defined here, will log at the
* 'warning' level, if most verbose is required, consider 'info' or 'debug'
*
* Please see Monolog documentation for usage of handlers and log levels
* @link https://github.com/Seldaek/monolog
*/
if (!defined("ROOTDIR")) {
die("This file cannot be accessed directly");
}
$handle = new ErrorLogHandler(ErrorLogHandler::OPERATING_SYSTEM, Logger::WARNING);
$handle->setFormatter(new LineFormatter('[%channel%] %level_name%: %message% %context% %extra%'));
Log::pushHandler($handle);
?>