.
This commit is contained in:
41
util.php
41
util.php
@@ -209,29 +209,28 @@ function base58btc_encode(string $bin): string {
|
||||
}
|
||||
|
||||
function logger(LogType $section, mixed $arg): void {
|
||||
if (LOGGING_ENABLED) {
|
||||
$success = false;
|
||||
$logfile = ROOT.'/log/';
|
||||
if (!LOGGING_ENABLED) return;
|
||||
$success = false;
|
||||
$logfile = ROOT.'/log/';
|
||||
|
||||
switch ($section) {
|
||||
case LogType::ActivityPub:
|
||||
$logfile .= 'ap_log.text';
|
||||
$success = true;
|
||||
break;
|
||||
case LogType::Auth:
|
||||
$logfile .= 'auth_log.text';
|
||||
$success = true;
|
||||
break;
|
||||
case LogType::Mailer:
|
||||
$logfile .= 'mail_log.text';
|
||||
$success = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ($success) file_put_contents($logfile, $arg."\n", FILE_APPEND);
|
||||
switch ($section) {
|
||||
case LogType::ActivityPub:
|
||||
$logfile .= 'ap_log.text';
|
||||
$success = true;
|
||||
break;
|
||||
case LogType::Auth:
|
||||
$logfile .= 'auth_log.text';
|
||||
$success = true;
|
||||
break;
|
||||
case LogType::Mailer:
|
||||
$logfile .= 'mail_log.text';
|
||||
$success = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ($success) file_put_contents($logfile, $arg."\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
function to_money($amount, $lang) {
|
||||
|
||||
Reference in New Issue
Block a user