diff options
author | Mario <mario@mariovavti.com> | 2021-04-26 18:31:08 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-04-26 18:31:08 +0000 |
commit | 2932ac9d8629fcc692d8a6964dbf1da12f6e6e84 (patch) | |
tree | ef2932ba9f3cee8ecdaedcb287c86881a0739316 /include/account.php | |
parent | 888c211f4463d0ec41fd8849e211ab8110a9caac (diff) | |
download | volse-hubzilla-2932ac9d8629fcc692d8a6964dbf1da12f6e6e84.tar.gz volse-hubzilla-2932ac9d8629fcc692d8a6964dbf1da12f6e6e84.tar.bz2 volse-hubzilla-2932ac9d8629fcc692d8a6964dbf1da12f6e6e84.zip |
register: only log to separate file if configured that way. default to standard logging via logger()
Diffstat (limited to 'include/account.php')
-rw-r--r-- | include/account.php | 11 |
1 files changed, 9 insertions, 2 deletions
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; } |