run:R W Run
DIR
2026-04-08 19:25:08
R W Run
DIR
2026-04-08 19:25:08
R W Run
DIR
2026-04-08 19:25:09
R W Run
33.01 KB
2026-04-08 19:19:35
R W Run
3.28 KB
2026-04-08 19:19:33
R W Run
14.57 KB
2026-04-08 19:19:33
R W Run
6.53 KB
2026-04-08 19:19:34
R W Run
279.73 KB
2026-04-08 19:19:34
R W Run
40.02 KB
2026-04-08 19:19:33
R W Run
1.14 KB
2026-04-08 19:19:35
R W Run
error_log
📄dist.loghandler.php
1<?php
2
3use Monolog\Formatter\LineFormatter;
4use Monolog\Handler\ErrorLogHandler;
5use Monolog\Handler\StreamHandler;
6use Monolog\Logger;
7
8/**
9 * install/dist.loghandler.php
10 *
11 ****************************
12 ** DO NOT EDIT THIS FILE! **
13 ****************************
14 *
15 * You are free to copy this file as "loghandler.php" and make any
16 * modification you need. This allows you to make customization that will not
17 * be overwritten during an update.
18 *
19 * WHMCS will attempt to load your custom "loghandler.php" instead of this
20 * file ("dist.loghandler.php").
21 *
22 ****************************
23 ** DO NOT EDIT THIS FILE! **
24 ****************************
25 *
26 * WHMCS initializes a Monolog logger, exposing the handler for customization.
27 *
28 * By default, WHMCS will log all messages to the configured PHP error log
29 * (i.e., the Apache webserver error log).
30 *
31 * NOTE:
32 * * The installer will attempt to write to install/log/installer.log. If this
33 * is not possible due to permissions, the default PHP error log will be used.
34 * * The installer's handler by default, as defined here, will log at the
35 * 'debug' level, the most verbose level possible.
36 * * The 'loghandler.php' file in the root directory will be loaded first, and
37 * then this file, creating a standard handler & then an installer specific
38 * handler. This may have relevance if you decide to alter this handler and
39 * "bubble" log messages through the handler stack.
40 * * The installer's handler by default will prevent "bubbling" of messages,
41 * namely to the standard handler will never be used. To change this behavior,
42 * pass the boolean "true" value as the last argument of the log handler's
43 * constructor.
44 *
45 * Please see Monolog documentation for usage of handlers and log levels
46 * @link https://github.com/Seldaek/monolog
47 *
48 * @copyright Copyright (c) WHMCS Limited 2005-2018
49 * @license https://www.whmcs.com/license/ WHMCS Eula
50 */
51
52if (!defined("ROOTDIR")) {
53 die("This file cannot be accessed directly");
54}
55
56// Handler for individual installer log, if possible.
57// Otherwise fall back to configured PHP error log
58$logDirectory = INSTALLER_DIR . DIRECTORY_SEPARATOR . 'log';
59$logFile = $logDirectory . DIRECTORY_SEPARATOR . 'installer.log';
60if (is_writable($logDirectory)
61 && (is_writable($logFile) || !file_exists($logFile))
62) {
63 $handleInstallLog = new StreamHandler(
64 $logFile,
65 Logger::DEBUG,
66 false
67 );
68
69 $format = "[%datetime%][%channel%] %level_name%: %message% %extra%\n";
70} else {
71 $handleInstallLog = new ErrorLogHandler(
72 ErrorLogHandler::OPERATING_SYSTEM,
73 Logger::DEBUG,
74 false
75 );
76
77 /**
78 * Auto append runtime detail of the outermost file responsible for the log
79 * entry. This is needed by control panels that parse a single error log
80 * and expose those entries based on the presence of the respective user's
81 * home directory in the message body.
82 */
83 $handleInstallLog->pushProcessor(function ($record) {
84 $script = (isset($_SERVER['SCRIPT_NAME'])) ? $_SERVER['SCRIPT_NAME'] : '';
85 $record['context'] = ['in ' . ROOTDIR . $script];
86
87 return $record;
88 });
89
90 $format = '[%channel%] %level_name%: %message% %context% %extra%';
91}
92
93$handleInstallLog->setFormatter(new LineFormatter($format));
94Log::pushHandler($handleInstallLog);
95