From 3a11e560d00b01d66281f710860ba1767dfe4bff Mon Sep 17 00:00:00 2001 From: "markus.gnigler" Date: Sun, 26 Jun 2022 22:27:16 +0200 Subject: [PATCH] Create default logging config in version 22 config folder #1754 --- 22/apache/config/logging.config.php | 13 +++++++++++++ 22/fpm-alpine/config/logging.config.php | 13 +++++++++++++ 22/fpm/config/logging.config.php | 13 +++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 22/apache/config/logging.config.php create mode 100644 22/fpm-alpine/config/logging.config.php create mode 100644 22/fpm/config/logging.config.php diff --git a/22/apache/config/logging.config.php b/22/apache/config/logging.config.php new file mode 100644 index 000000000..6fd7edf8c --- /dev/null +++ b/22/apache/config/logging.config.php @@ -0,0 +1,13 @@ + getenv('LOGLEVEL') ?: 2, + 'logtimezone' => getenv('LOGTIMEZONE') ?: 'UTC', + 'syslog_tag' => getenv('LOGTAG') ?: 'Nextcloud', +); + +if (getenv('LOGFILE')) { + $CONFIG['logfile'] = getenv('LOGFILE'); +} else { + $CONFIG['logfile'] = getenv('NEXTCLOUD_DATA_DIR') ?: '/var/www/nextcloud' + '/nextcloud.log'; +} \ No newline at end of file diff --git a/22/fpm-alpine/config/logging.config.php b/22/fpm-alpine/config/logging.config.php new file mode 100644 index 000000000..6fd7edf8c --- /dev/null +++ b/22/fpm-alpine/config/logging.config.php @@ -0,0 +1,13 @@ + getenv('LOGLEVEL') ?: 2, + 'logtimezone' => getenv('LOGTIMEZONE') ?: 'UTC', + 'syslog_tag' => getenv('LOGTAG') ?: 'Nextcloud', +); + +if (getenv('LOGFILE')) { + $CONFIG['logfile'] = getenv('LOGFILE'); +} else { + $CONFIG['logfile'] = getenv('NEXTCLOUD_DATA_DIR') ?: '/var/www/nextcloud' + '/nextcloud.log'; +} \ No newline at end of file diff --git a/22/fpm/config/logging.config.php b/22/fpm/config/logging.config.php new file mode 100644 index 000000000..6fd7edf8c --- /dev/null +++ b/22/fpm/config/logging.config.php @@ -0,0 +1,13 @@ + getenv('LOGLEVEL') ?: 2, + 'logtimezone' => getenv('LOGTIMEZONE') ?: 'UTC', + 'syslog_tag' => getenv('LOGTAG') ?: 'Nextcloud', +); + +if (getenv('LOGFILE')) { + $CONFIG['logfile'] = getenv('LOGFILE'); +} else { + $CONFIG['logfile'] = getenv('NEXTCLOUD_DATA_DIR') ?: '/var/www/nextcloud' + '/nextcloud.log'; +} \ No newline at end of file