From 476a9bcfdf0761759049aa52a64d90a8044764b2 Mon Sep 17 00:00:00 2001 From: Kobi Meirson Date: Sun, 13 Nov 2022 16:51:26 +0200 Subject: [PATCH] fix(logging): retain the user values for error_log when toggling the log on/off --- src/nginxconfig/generators/conf/nginx.conf.js | 3 ++- src/nginxconfig/templates/domain_sections/logging.vue | 6 +++--- src/nginxconfig/util/logging.js | 1 + src/nginxconfig/util/vue_backwards_compatibility.js | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/nginxconfig/generators/conf/nginx.conf.js b/src/nginxconfig/generators/conf/nginx.conf.js index 648995c..74308a2 100644 --- a/src/nginxconfig/generators/conf/nginx.conf.js +++ b/src/nginxconfig/generators/conf/nginx.conf.js @@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +import { errorLogPathDisabled } from '../../util/logging'; import sslProfiles from '../../util/ssl_profiles'; import websiteConf from './website.conf'; @@ -112,7 +113,7 @@ export default (domains, global) => { config.http.push(['error_log', global.logging.errorLogPath.computed.trim() + ` ${global.logging.errorLogLevel.computed}`]); } else { - config.http.push(['error_log', '/dev/null']); + config.http.push(['error_log', errorLogPathDisabled]); } if (global.security.limitReq.computed) { diff --git a/src/nginxconfig/templates/domain_sections/logging.vue b/src/nginxconfig/templates/domain_sections/logging.vue index 8610b22..f0770d6 100644 --- a/src/nginxconfig/templates/domain_sections/logging.vue +++ b/src/nginxconfig/templates/domain_sections/logging.vue @@ -154,7 +154,7 @@ THE SOFTWARE.