log_util.h 419 B

1234567891011121314151617181920212223
  1. #ifndef LOG_UTIL_H
  2. #define LOG_UTIL_H
  3. #include <stdint.h>
  4. #include <string>
  5. #include "cos_defines.h"
  6. namespace qcloud_cos {
  7. typedef void (*LogCallback)(const std::string& logstr);
  8. class LogUtil {
  9. public:
  10. static std::string GetLogPrefix(int level);
  11. static std::string FormatLog(int level, const char* fmt, ...);
  12. static void Syslog(int level, const char* fmt, ...);
  13. };
  14. } // namespace qcloud_cos
  15. #endif