各种有用的erlang行为
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

23 行
516 B

  1. -ifndef(genGbh_H).
  2. -define(genGbh_H, true).
  3. -record(gbhOpts, {
  4. daemon = false :: boolean() %% 是否是守护进程模式 try catch 捕捉到出错之后 是否关闭进程 还是仅仅打印日志 调用、handleError
  5. }).
  6. -ifdef(debug_gbh).
  7. %% debug 调试相关宏定义
  8. -define(NOT_DEBUG, []).
  9. -define(SYS_DEBUG(Debug, Name, Msg),
  10. case Debug of
  11. ?NOT_DEBUG ->
  12. ok;
  13. _ ->
  14. sys:handle_debug(Debug, fun print_event/3, Name, Msg)
  15. end).
  16. -else.
  17. -define(SYS_DEBUG(Debug, Name, Msg), ok).
  18. -endif.
  19. -endif.