Support for source file/line logging

This commit is contained in:
gabime
2018-11-22 18:47:50 +02:00
parent 216cd6935f
commit f2305fe5bf
6 changed files with 176 additions and 32 deletions

View File

@@ -185,6 +185,15 @@ using filename_t = std::wstring;
using filename_t = std::string;
#endif
struct source_loc
{
SPDLOG_CONSTEXPR source_loc(): filename(""), line(0) {}
SPDLOG_CONSTEXPR source_loc(const char *filename, int line) : filename(filename), line(line) {}
const char* const filename ;
const uint32_t line;
};
namespace details {
// make_unique support for pre c++14