fix(cr): migrate previous `access_log` and `error_log` paths using the previous behavior
parent
fe523c0edc
commit
269b34a821
|
@ -66,7 +66,7 @@ const migrateLogging = data => {
|
||||||
const perDomainAccessLogEnabled = !!perDomainLogging.accessLog;
|
const perDomainAccessLogEnabled = !!perDomainLogging.accessLog;
|
||||||
if (perDomainAccessLogEnabled) {
|
if (perDomainAccessLogEnabled) {
|
||||||
accessLogEnabled = true;
|
accessLogEnabled = true;
|
||||||
accessLogPath = `/var/log/nginx/${perDomainServer.domain}.access.log`;
|
accessLogPath = accessLogPath.replace(/([^/]+)\.log$/, `${perDomainServer.domain}.$1.log`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// error_log
|
// error_log
|
||||||
|
@ -77,7 +77,7 @@ const migrateLogging = data => {
|
||||||
const perDomainErrorLogEnabled = !!perDomainLogging.errorLog;
|
const perDomainErrorLogEnabled = !!perDomainLogging.errorLog;
|
||||||
if (perDomainErrorLogEnabled) {
|
if (perDomainErrorLogEnabled) {
|
||||||
errorLogEnabled = true;
|
errorLogEnabled = true;
|
||||||
errorLogPath = `/var/log/nginx/${perDomainServer.domain}.error.log`;
|
errorLogPath = errorLogPath.replace(/([^/]+)\.log$/, `${perDomainServer.domain}.$1.log`);
|
||||||
}
|
}
|
||||||
|
|
||||||
data.domains[key].logging = {
|
data.domains[key].logging = {
|
||||||
|
|
Loading…
Reference in New Issue