UAT_log.py 619 B

1234567891011121314151617181920212223
  1. # -*- coding:utf-8 -*-
  2. import os, sys, time
  3. from ssat_sdk.utils.LoggingUtil import printLog
  4. TAG = "UATree:"
  5. DEBUG = True # 上传SVN时注意将此参数设置为False
  6. INFO = True
  7. ERROR = True
  8. def debug(cls, fun, msg, enable):
  9. if DEBUG and enable:
  10. pstr = "Debug:" + TAG + cls + "[" + fun + "]" + msg
  11. printLog(pstr)
  12. def info(cls, fun, msg, enable):
  13. if INFO and enable:
  14. pstr = "Info:" + TAG + cls + "[" + fun + "]" + msg
  15. printLog(pstr)
  16. def error(cls, fun, msg, enable):
  17. if ERROR and enable:
  18. pstr = "Error:" + TAG + cls + "[" + fun + "]" + msg
  19. printLog(pstr)