mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
23 lines
668 B
C++
23 lines
668 B
C++
#include "Error.h"
|
|
|
|
namespace encfs {
|
|
|
|
el::base::DispatchAction rlogAction = el::base::DispatchAction::NormalLog;
|
|
|
|
Error::Error(const char *msg) : runtime_error(msg) {}
|
|
|
|
void initLogging(bool enable_debug) {
|
|
el::Loggers::addFlag(el::LoggingFlag::ColoredTerminalOutput);
|
|
|
|
el::Configurations defaultConf;
|
|
defaultConf.setToDefault();
|
|
defaultConf.set(el::Level::Verbose, el::ConfigurationType::Format,
|
|
std::string("%datetime %level [%fbase:%line] %msg"));
|
|
if (!enable_debug) {
|
|
defaultConf.set(el::Level::Debug, el::ConfigurationType::Enabled, "false");
|
|
}
|
|
el::Loggers::reconfigureLogger("default", defaultConf);
|
|
}
|
|
|
|
} // namespace encfs
|