BusinessLogs.java 925 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.yihu.wlyy.logs;
  2. import org.json.JSONObject;
  3. import org.slf4j.Logger;
  4. import org.slf4j.LoggerFactory;
  5. /**
  6. * 业务日志输出
  7. *
  8. * Created by lyr-pc on 2017/1/19.
  9. */
  10. public class BusinessLogs {
  11. // 日志输出
  12. private static Logger logger = LoggerFactory.getLogger(BusinessLogs.class);
  13. /**
  14. * 业务类型
  15. */
  16. public enum BusinessType {
  17. //注册
  18. register
  19. //签约
  20. , sign
  21. //咨询
  22. , consult
  23. //指导
  24. , guidance
  25. //健康教育
  26. , article
  27. //随访
  28. , followup
  29. //预约
  30. , appointment
  31. //标签
  32. , label
  33. }
  34. /**
  35. * 业务日志输出
  36. *
  37. * @param type 业务类别
  38. * @param info 日志信息
  39. */
  40. public static void info(BusinessType type, JSONObject info) {
  41. logger.info(type.ordinal() + " - " + info.toString());
  42. }
  43. }