config.sample.yaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. yaml_util_test:
  2. # Enable logger
  3. enable: true
  4. # Backends
  5. backends:
  6. # A sample of stdout backend.
  7. sample_backend_console_stdout:
  8. # Should be one of 'console', 'file', 'alisls'
  9. type: "console"
  10. # Minimum emit level, should be one of 'DEBUG', 'VERBOSE', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
  11. level: "DEBUG"
  12. # This field should be defined for type 'console'
  13. console_config:
  14. # Should be one of 'stdout', 'stderr'
  15. to: "stdout"
  16. # A sample of file without log-rotate
  17. sample_backend_no_rotate_file:
  18. # Should be one of 'console', 'file', 'alisls'
  19. type: "file"
  20. # Minimum emit level, should be one of 'DEBUG', 'VERBOSE', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
  21. level: "INFO"
  22. # This field should be defined for type 'file'
  23. file_config:
  24. # The path to log file
  25. filename: "no-rotate-info.log"
  26. # Use 'true' for using console backend formatter for file backend
  27. fvconsole: false
  28. # Use 'false' for disable rotate
  29. rotate: false
  30. # A sample of file without log-rotate
  31. sample_backend_rotate_file:
  32. # Should be one of 'console', 'file', 'alisls'
  33. type: "file"
  34. # Minimum emit level, should be one of 'DEBUG', 'VERBOSE', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
  35. level: "VERBOSE"
  36. # This field should exist for type 'file'
  37. file_config:
  38. # The path to log file
  39. filename: "rotate-verbose.log"
  40. # Use 'true' for using console backend formatter for file backend
  41. fvconsole: false
  42. # Use 'true' for enable rotate
  43. rotate: true
  44. # This field should exist for rotate log
  45. rotate_config:
  46. # The maximum size in megabytes of the log file before it gets rotated
  47. maxsize: 10
  48. # The maximum number of days to retain old log files based on the timestamp encoded in their filename.
  49. # Note that a day is defined as 24 hours and may not exactly correspond to calendar days due to daylight
  50. # savings, leap seconds, etc. '0' for not to remove old log files based on age
  51. maxage: 0
  52. # The maximum number of old log files to retain. '0' for retain all old log files
  53. # (though MaxAge may still cause them to get deleted.)
  54. maxbackups: 0
  55. # This determines if the time used for formatting the timestamps in backup files is the computer's local time.
  56. # 'false' to use UTC time, 'true' to use local time.
  57. localtime: true
  58. # This determines if the rotated log files should be compressed using gzip.
  59. # 'true' for using gzip, 'false' for not using gzip
  60. compress: true
  61. sample_backend_alisls:
  62. # Should be one of 'console', 'file', 'alisls'
  63. type: "alisls"
  64. # Minimum emit level, should be one of 'DEBUG', 'VERBOSE', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
  65. level: "DEBUG"
  66. # This field should exist for type 'file'
  67. alisls_config:
  68. # Use 'true' for enable AliSLS producer debug log.
  69. # AliSLS producer will print log to stdout, and we have no way to disable it,
  70. # but we can specify the output level. 'true' for level 'debug', 'false' for level 'error'
  71. alisls_producer_debug: false
  72. # Your Hieda Logger hostname
  73. hostname: "<Your HiedaLogger Hostname>"
  74. # Your Hieda Logger app name
  75. appname: "<Your HiedaLogger App Name>"
  76. # Your AliSLS appkey id
  77. ak_id: "<Your AliSLS Appkey ID>"
  78. # Your AliSLS appkey secret
  79. ak_secret: "<Your AliSLS Appkey Secret>"
  80. # Your AliSLS endpoint
  81. endpoint: "<Your AliSLS Endpoint>"
  82. # Your AliSLS project
  83. project: "<Your AliSLS Project>"
  84. # Your AliSLS logstore
  85. logstore: "<Your AliSLS Logstore>"
  86. # Your AliSLS topic
  87. topic: "<Your AliSLS Topic>"
  88. # The IP address for AliSLS emit parameter 'source'
  89. emit_ip: "0.0.0.0"
  90. # Use 'true' to override 'emit_ip' below with your real Internet IP address if possible
  91. override_with_real_ip: false
  92. # Do not specify this in most situation. Refer to Aliyun SLS documentation.
  93. # extend_alisls_config:
  94. # total_size_ln_bytes: 104857600
  95. # max_io_worker_count: 50
  96. # max_block_sec: 60
  97. # max_batch_size: 524288
  98. # max_batch_count: 4096
  99. # linger_ms: 2000
  100. # retries: 10
  101. # max_reserved_attempts: 11
  102. # base_retry_backoff_ms: 100
  103. # max_retry_backoff_ms: 50000
  104. # adjust_sharg_hash: true
  105. # buckets: 64
  106. # allow_log_level: ""
  107. # log_file_name: ""
  108. # is_json_type: false
  109. # log_max_size: 0
  110. # log_max_backups: 0
  111. # log_compress: false
  112. # no_retry_status_code_list:
  113. # - 400
  114. # - 404