1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- # config for log
- log:
- # 'true' for enable access log, 'false' for disable access log
- access_log_enable: true,
- # config for log rolling
- rolling_log_config:
- # config for error log rolling
- error_log:
- # absolute path to log (log rotating will append infix into filename)
- file: "/data/logs/frontend.err.log"
- # max size per log file (MegaBytes)
- max_size: 16
- # max days for rotating
- max_age: 30
- # max backups for rotating remain
- max_backups: 50
- # 'true' for using local time for rotating
- use_local_time: true
- # 'true' for compress rotating history into zip files
- compress_history: true
- # config for access log rolling
- access_log:
- # absolute path to log (log rotating will append infix into filename)
- file: "/data/logs/frontend.access.log"
- # max size per log file (MegaBytes)
- max_size: 16
- # max days for rotating
- max_age: 30
- # max backups for rotating remain
- max_backups: 50
- # 'true' for using local time for rotating
- use_local_time: true
- # 'true' for compress rotating history into zip files
- compress_history: true
- # detail config for access log
- error_logger_config:
- # the log emitting level, the message which level below this will be emitted
- # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
- # all level option below should be one of these values
- output_level: "INFO"
- # format string for log. this formation using YAGTF.
- # Reference: http://git.swzry.com/zry/YAGTF
- # Expanded Tags: <level>, <unit>, <msg>
- log_format: "[!<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt>{<unit>} <msg><br>"
- # detail config for access log
- access_logger_config:
- # the log emitting level, the message which level below this will be emitted
- # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
- # all level option below should be one of these values
- output_level: "INFO"
- # level for HTTP 200
- success_level: "INFO"
- # level for HTTP 404
- not_found_level: "WARN"
- # level for HTTP 403
- forbidden_level: "WARN"
- # level for HTTP 502/503
- gateway_error_level: "ERROR"
- # level for HTTP 500
- internal_error_level: "ERROR"
- # level for logging before response
- prelog_level: "DEBUG"
- # format string for log. this formation using YAGTF.
- # Reference: http://git.swzry.com/zry/YAGTF
- # 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>"
|