|
@@ -1,7 +1,17 @@
|
|
|
|
+# common config
|
|
|
|
+common:
|
|
|
|
+ # 'true' for enable global debug mode, 'false' for production environment
|
|
|
|
+ debug: true
|
|
|
|
+ # 'true' for redirect to 'redirect_url' when file not found, 'false' to return 404 message.
|
|
|
|
+ redirect_when_404: true
|
|
|
|
+ # when 'redirect_when_404' is 'true', it will redirect to this url when file not found.
|
|
|
|
+ redirect_url: "/"
|
|
|
|
+ # 'true' for enable backend reverse proxy, 'false' for disable.
|
|
|
|
+ backend_proxy_enable: true
|
|
# config for log
|
|
# config for log
|
|
log:
|
|
log:
|
|
# 'true' for enable access log, 'false' for disable access log
|
|
# 'true' for enable access log, 'false' for disable access log
|
|
- access_log_enable: true,
|
|
|
|
|
|
+ access_log_enable: true
|
|
# config for log rolling
|
|
# config for log rolling
|
|
rolling_log_config:
|
|
rolling_log_config:
|
|
# config for error log rolling
|
|
# config for error log rolling
|
|
@@ -33,7 +43,7 @@ log:
|
|
# 'true' for compress rotating history into zip files
|
|
# 'true' for compress rotating history into zip files
|
|
compress_history: true
|
|
compress_history: true
|
|
# detail config for access log
|
|
# detail config for access log
|
|
- error_logger_config:
|
|
|
|
|
|
+ error_log_config:
|
|
# the log emitting level, the message which level below this will be emitted
|
|
# the log emitting level, the message which level below this will be emitted
|
|
# optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
|
|
# optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
|
|
# all level option below should be one of these values
|
|
# all level option below should be one of these values
|
|
@@ -41,9 +51,12 @@ log:
|
|
# format string for log. this formation using YAGTF.
|
|
# format string for log. this formation using YAGTF.
|
|
# Reference: http://git.swzry.com/zry/YAGTF
|
|
# Reference: http://git.swzry.com/zry/YAGTF
|
|
# Expanded Tags: <level>, <unit>, <msg>
|
|
# Expanded Tags: <level>, <unit>, <msg>
|
|
- log_format: "[!<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt>{<unit>} <msg><br>"
|
|
|
|
|
|
+ # Example: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
|
|
|
|
+ log_format: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
|
|
|
|
+ # 'true' for use UTC time in log, 'false' for use local timezone.
|
|
|
|
+ use_utc: false
|
|
# detail config for access log
|
|
# detail config for access log
|
|
- access_logger_config:
|
|
|
|
|
|
+ access_log_config:
|
|
# the log emitting level, the message which level below this will be emitted
|
|
# the log emitting level, the message which level below this will be emitted
|
|
# optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
|
|
# optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
|
|
# all level option below should be one of these values
|
|
# all level option below should be one of these values
|
|
@@ -58,14 +71,15 @@ log:
|
|
gateway_error_level: "ERROR"
|
|
gateway_error_level: "ERROR"
|
|
# level for HTTP 500
|
|
# level for HTTP 500
|
|
internal_error_level: "ERROR"
|
|
internal_error_level: "ERROR"
|
|
- # level for logging before response
|
|
|
|
- prelog_level: "DEBUG"
|
|
|
|
|
|
+ # level for Other HTTP Status Code
|
|
|
|
+ other_status_level: "INFO"
|
|
# format string for log. this formation using YAGTF.
|
|
# format string for log. this formation using YAGTF.
|
|
# Reference: http://git.swzry.com/zry/YAGTF
|
|
# Reference: http://git.swzry.com/zry/YAGTF
|
|
# Expanded Tags: <level>, <url>, <status>
|
|
# Expanded Tags: <level>, <url>, <status>
|
|
- # Example: "{<q>time<q>: <q>!<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>status<q>: <status>, <q>url<q>: <q><url><q>}<br>"
|
|
|
|
- # Output example for this example: {"time": "2019-09-19 11:45:14.191981000 +0800 CST", "level": "INFO", "status": 200, "url": "/"}
|
|
|
|
- log_format: "{<q>time<q>: <q>!<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>status<q>: <status>, <q>url<q>: <q><url><q>}<br>"
|
|
|
|
-
|
|
|
|
|
|
+ # Example: "!{<q>time<q>: <q><y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>method<q>: <q><method><q>, <q>status<q>: <status>, <q>client_ip<q>: <q><cip><q>, <q>url<q>: <q><url><q>}<br>"
|
|
|
|
+ # Output example for this example: {"time": "2019-09-19 11:45:14.191981000 +0800 CST", "level": "INFO", "method": "GET", "status": 200, "client_ip": "127.0.0.1", "url": "/"}
|
|
|
|
+ log_format: "!{<q>time<q>: <q><y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>method<q>: <q><method><q>, <q>status<q>: <status>, <q>client_ip<q>: <q><cip><q>, <q>url<q>: <q><url><q>}<br>"
|
|
|
|
+ # 'true' for use UTC time in log, 'false' for use local timezone.
|
|
|
|
+ use_utc: false
|
|
|
|
|
|
|
|
|