12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #pragma once
- #ifndef DIOS_SYS_LOG_HEAD
- #define DIOS_SYS_LOG_HEAD
- #include <string>
- typedef enum _System_Log_Level {
- SYS_LOG_LEVEL_RESET,
- SYS_LOG_LEVEL_Trace,
- SYS_LOG_LEVEL_Debug,
- SYS_LOG_LEVEL_Information,
- SYS_LOG_LEVEL_Warning,
- SYS_LOG_LEVEL_Error,
- SYS_LOG_LEVEL_Fatal,
- SYS_LOG_LEVEL_Recoverable,
- SYS_LOG_LEVEL_Action,
- SYS_LOG_LEVEL_Telegram,
- SYS_LOG_LEVEL_Ortho,
- SYS_LOG_LEVEL_MAX
- }SYS_LOG_LEVEL;
- std::string SysLogLevel2str(int nlevel)
- {
- std::string out;
- switch (nlevel)
- {
- case SYS_LOG_LEVEL_RESET:
- out = "RESET";
- break;
- case SYS_LOG_LEVEL_Trace:
- out = "Trace";
- break;
- case SYS_LOG_LEVEL_Debug:
- out = "Debug";
- break;
- case SYS_LOG_LEVEL_Information:
- out = "Info";
- break;
- case SYS_LOG_LEVEL_Warning:
- out = "Warning";
- break;
- case SYS_LOG_LEVEL_Error:
- out = "Error";
- break;
- case SYS_LOG_LEVEL_Fatal:
- out = "Fatal";
- break;
- case SYS_LOG_LEVEL_Recoverable:
- out = "Recoverable";
- break;
- case SYS_LOG_LEVEL_Action:
- out = "Action";
- break;
- case SYS_LOG_LEVEL_Telegram:
- out = "Telegram";
- break;
- case SYS_LOG_LEVEL_Ortho:
- out = "Ortho";
- break;
- default:
- out = "";
- }
- return out;
- }
- #else
- #endif
|