zdwsi.frontend.config.yaml 3.9 KB

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