From 2932ac9d8629fcc692d8a6964dbf1da12f6e6e84 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 26 Apr 2021 18:31:08 +0000 Subject: register: only log to separate file if configured that way. default to standard logging via logger() --- include/account.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/account.php b/include/account.php index 349c6cfee..36fad58c4 100644 --- a/include/account.php +++ b/include/account.php @@ -1195,8 +1195,15 @@ function get_account_techlevel($account_id = 0) { } function zar_log($msg='') { - file_put_contents('./zar.log', - date('Y-m-d_H:i:s') . ' ' . $msg . ', ip: § ' . $_SERVER['REMOTE_ADDR'] . ' §' . "\n", FILE_APPEND); + + if(get_config('system', 'register_logfile', 0)) { + file_put_contents('./zar.log', + date('Y-m-d_H:i:s') . ' ' . $msg . ', ip: § ' . $_SERVER['REMOTE_ADDR'] . ' §' . "\n", FILE_APPEND); + } + else { + logger('zar_log: ' . $msg . ', ip: § ' . $_SERVER['REMOTE_ADDR'] . ' §'); + } + return; } -- cgit v1.2.3