file helper

This commit is contained in:
gabi
2014-10-26 01:29:50 +02:00
parent 8fb32dcb65
commit b94ca27ce4
10 changed files with 167 additions and 104 deletions

View File

@@ -1,7 +1,6 @@
#pragma once
#include<initializer_list>
#include<memory>
#include<chrono>
namespace c11log
@@ -37,4 +36,20 @@ inline const char* to_str(c11log::level::level_enum l)
return level_names[l];
}
} //level
//
// Log exception
//
class fflog_exception : public std::exception
{
public:
fflog_exception(const std::string& msg) :_msg(msg) {};
const char* what() const throw() override {
return _msg.c_str();
}
private:
std::string _msg;
};
} //c11log