rewrite from lager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.0 KiB

  1. [
  2. {eRum, [
  3. %% 是否开启颜色
  4. {colored, false},
  5. %% 颜色码配置
  6. {colors, [
  7. {debug, "\e[0;38m"},
  8. {info, "\e[1;37m"},
  9. {notice, "\e[1;36m"},
  10. {warning, "\e[1;33m"},
  11. {error, "\e[1;31m"},
  12. {critical, "\e[1;35m"},
  13. {alert, "\e[1;44m"},
  14. {emergency, "\e[1;41m"}
  15. ]},
  16. %% crash log cfg
  17. %% 有效值 string | false
  18. %% 为 false 的时候 没有 crash logger.
  19. {crash_log, "log/crash.log"},
  20. %% Maximum size in bytes of events in the crash log - defaults to 65536
  21. {crash_log_msg_size, 65536},
  22. %% Maximum size of the crash log in bytes, before its rotated, set to 0 to disable rotation - default is 0
  23. {crash_log_size, 10485760},
  24. %% What time to rotate the crash log - default is no time rotation. See the README for a description of this format.
  25. {crash_log_date, "$D0"},
  26. %% Number of rotated crash logs to keep, 0 means keep only the current one - default is 0
  27. {crash_log_count, 5},
  28. %% Crash Log Rotator Module - default is lager_rotator_default
  29. {crash_log_rotator, lager_rotator_default},
  30. %% Whether to redirect error_logger messages into the default lager_event sink - defaults to true
  31. {error_logger_redirect, true},
  32. %% How many messages per second to allow from error_logger before we start dropping them
  33. {error_logger_hwm, 50},
  34. %% How big the gen_event mailbox can get before it is
  35. %% switched into sync mode. This value only applies to
  36. %% the default sink; extra sinks can supply their own.
  37. {async_threshold, 20},
  38. %% Switch back to async mode, when gen_event mailbox size
  39. %% decrease from `async_threshold' to async_threshold -
  40. %% async_threshold_window. This value only applies to the
  41. %% default sink; extra sinks can supply their own.
  42. {async_threshold_window, 5}
  43. ]}
  44. ].