zdwsi.frontend.config.default.yaml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # common config
  2. common:
  3. # 'true' for enable global debug mode, 'false' for production environment
  4. debug: true
  5. # 'true' for redirect to 'redirect_url' when file not found, 'false' to return 404 message.
  6. redirect_when_404: true
  7. # when 'redirect_when_404' is 'true', it will redirect to this url when file not found.
  8. redirect_url: "/"
  9. # 'true' for enable backend reverse proxy, 'false' for disable.
  10. backend_proxy_enable: true
  11. # config for log
  12. log:
  13. # 'true' for enable access log, 'false' for disable access log
  14. access_log_enable: true
  15. # config for log rolling
  16. rolling_log_config:
  17. # config for error log rolling
  18. error_log:
  19. # absolute path to log (log rotating will append infix into filename)
  20. file: "/data/logs/frontend.err.log"
  21. # max size per log file (MegaBytes)
  22. max_size: 16
  23. # max days for rotating
  24. max_age: 30
  25. # max backups for rotating remain
  26. max_backups: 50
  27. # 'true' for using local time for rotating
  28. use_local_time: true
  29. # 'true' for compress rotating history into zip files
  30. compress_history: true
  31. # config for access log rolling
  32. access_log:
  33. # absolute path to log (log rotating will append infix into filename)
  34. file: "/data/logs/frontend.access.log"
  35. # max size per log file (MegaBytes)
  36. max_size: 16
  37. # max days for rotating
  38. max_age: 30
  39. # max backups for rotating remain
  40. max_backups: 50
  41. # 'true' for using local time for rotating
  42. use_local_time: true
  43. # 'true' for compress rotating history into zip files
  44. compress_history: true
  45. # detail config for access log
  46. error_log_config:
  47. # the log emitting level, the message which level below this will be emitted
  48. # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
  49. # all level option below should be one of these values
  50. output_level: "INFO"
  51. # format string for log. this formation using YAGTF.
  52. # Reference: http://git.swzry.com/zry/YAGTF
  53. # Expanded Tags: <level>, <unit>, <msg>
  54. # Example: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
  55. log_format: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
  56. # 'true' for use UTC time in log, 'false' for use local timezone.
  57. use_utc: false
  58. # detail config for access log
  59. access_log_config:
  60. # the log emitting level, the message which level below this will be emitted
  61. # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
  62. # all level option below should be one of these values
  63. output_level: "INFO"
  64. # level for HTTP 200
  65. success_level: "INFO"
  66. # level for HTTP 404
  67. not_found_level: "WARN"
  68. # level for HTTP 403
  69. forbidden_level: "WARN"
  70. # level for HTTP 502/503
  71. gateway_error_level: "ERROR"
  72. # level for HTTP 500
  73. internal_error_level: "ERROR"
  74. # level for Other HTTP Status Code
  75. other_status_level: "INFO"
  76. # format string for log. this formation using YAGTF.
  77. # Reference: http://git.swzry.com/zry/YAGTF
  78. # Expanded Tags: <level>, <url>, <status>
  79. # 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>"
  80. # 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": "/"}
  81. 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>"
  82. # 'true' for use UTC time in log, 'false' for use local timezone.
  83. use_utc: false