提交 36bbbcd5 编写于 作者: Y YiYing He 提交者: Yi-Ying He

[Log] Add function to set debug logging level.

上级 79a14e9d
...@@ -18,6 +18,8 @@ namespace Log { ...@@ -18,6 +18,8 @@ namespace Log {
void passEasyloggingppArgs(int Argc, char *Argv[]); void passEasyloggingppArgs(int Argc, char *Argv[]);
void setDebugLoggingLevel();
void setErrorLoggingLevel(); void setErrorLoggingLevel();
extern el::base::type::StoragePointer elStorage; extern el::base::type::StoragePointer elStorage;
......
...@@ -13,6 +13,12 @@ void passEasyloggingppArgs(int Argc, char *Argv[]) { ...@@ -13,6 +13,12 @@ void passEasyloggingppArgs(int Argc, char *Argv[]) {
START_EASYLOGGINGPP(Argc, Argv); START_EASYLOGGINGPP(Argc, Argv);
} }
void setDebugLoggingLevel() {
el::Loggers::addFlag(el::LoggingFlag::HierarchicalLogging);
el::Loggers::addFlag(el::LoggingFlag::IgnoreSigInt);
el::Loggers::setLoggingLevel(el::Level::Debug);
}
void setErrorLoggingLevel() { void setErrorLoggingLevel() {
el::Loggers::addFlag(el::LoggingFlag::HierarchicalLogging); el::Loggers::addFlag(el::LoggingFlag::HierarchicalLogging);
el::Loggers::addFlag(el::LoggingFlag::IgnoreSigInt); el::Loggers::addFlag(el::LoggingFlag::IgnoreSigInt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册