.

諏訪子 <suwako@076.moe>、2026-02-27 02:13
コミット b723230818d79f2ee6a9444a8027d82187579bac ・親 0bf04e7 ・ファイルを見る

1個のファイル、+20 -21

変更 util.php
@@ -209,29 +209,28 @@
209209 }
210210
211211 function logger(LogType $section, mixed $arg): void {
212- if (LOGGING_ENABLED) {
213- $success = false;
214- $logfile = ROOT.'/log/';
212+ if (!LOGGING_ENABLED) return;
213+ $success = false;
214+ $logfile = ROOT.'/log/';
215215
216- switch ($section) {
217- case LogType::ActivityPub:
218- $logfile .= 'ap_log.text';
219- $success = true;
220- break;
221- case LogType::Auth:
222- $logfile .= 'auth_log.text';
223- $success = true;
224- break;
225- case LogType::Mailer:
226- $logfile .= 'mail_log.text';
227- $success = true;
228- break;
229- default:
230- break;
231- }
232-
233- if ($success) file_put_contents($logfile, $arg."\n", FILE_APPEND);
216+ switch ($section) {
217+ case LogType::ActivityPub:
218+ $logfile .= 'ap_log.text';
219+ $success = true;
220+ break;
221+ case LogType::Auth:
222+ $logfile .= 'auth_log.text';
223+ $success = true;
224+ break;
225+ case LogType::Mailer:
226+ $logfile .= 'mail_log.text';
227+ $success = true;
228+ break;
229+ default:
230+ break;
234231 }
232+
233+ if ($success) file_put_contents($logfile, $arg."\n", FILE_APPEND);
235234 }
236235
237236 function to_money($amount, $lang) {