This commit is contained in:
2026-02-27 02:13:53 +09:00
parent 0bf04e7301
commit b723230818

View File

@@ -209,29 +209,28 @@ function base58btc_encode(string $bin): string {
} }
function logger(LogType $section, mixed $arg): void { function logger(LogType $section, mixed $arg): void {
if (LOGGING_ENABLED) { if (!LOGGING_ENABLED) return;
$success = false; $success = false;
$logfile = ROOT.'/log/'; $logfile = ROOT.'/log/';
switch ($section) { switch ($section) {
case LogType::ActivityPub: case LogType::ActivityPub:
$logfile .= 'ap_log.text'; $logfile .= 'ap_log.text';
$success = true; $success = true;
break; break;
case LogType::Auth: case LogType::Auth:
$logfile .= 'auth_log.text'; $logfile .= 'auth_log.text';
$success = true; $success = true;
break; break;
case LogType::Mailer: case LogType::Mailer:
$logfile .= 'mail_log.text'; $logfile .= 'mail_log.text';
$success = true; $success = true;
break; break;
default: default:
break; break;
}
if ($success) file_put_contents($logfile, $arg."\n", FILE_APPEND);
} }
if ($success) file_put_contents($logfile, $arg."\n", FILE_APPEND);
} }
function to_money($amount, $lang) { function to_money($amount, $lang) {