Fixed for cloudflare logformat

pull/410/head
Will 保哥 2022-11-22 01:27:44 +08:00 committed by GitHub
parent 051c209564
commit ca5e86bf90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ THE SOFTWARE.
*/ */
export const accessLogPathDefault = '/var/log/nginx/access.log'; export const accessLogPathDefault = '/var/log/nginx/access.log';
export const accessLogParamsDefault = 'combined buffer=512k flush=1m'; export const accessLogParamsDefault = 'buffer=512k flush=1m';
export const errorLogPathDefault = '/var/log/nginx/error.log'; export const errorLogPathDefault = '/var/log/nginx/error.log';
export const errorLogPathDisabled = '/dev/null'; export const errorLogPathDisabled = '/dev/null';
@ -40,7 +40,7 @@ export const getDomainAccessLog = (domain, global) => {
} }
return path + return path +
(global.logging.cloudflare.computed ? ' cloudflare' : '') + (global.logging.cloudflare.computed ? ' cloudflare' : ' combined') +
(domain.logging.accessLogParameters.computed.trim() ? ` ${domain.logging.accessLogParameters.computed.trim()}`: ''); (domain.logging.accessLogParameters.computed.trim() ? ` ${domain.logging.accessLogParameters.computed.trim()}`: '');
}; };