This commit is contained in:
gabi
2014-11-01 02:12:12 +02:00
parent bf303fad19
commit 567e85e6d4
15 changed files with 169 additions and 89 deletions

View File

@@ -6,11 +6,11 @@
#include "spdlog/spdlog.h"
int main(int, char* [])
int main_(int, char* [])
{
namespace spd = spdlog;
try
{
std::string filename = "spdlog_example";
@@ -33,12 +33,13 @@ int main(int, char* [])
console->warn("This should!");
// Change format pattern to all loggers
spd::set_pattern(" **** %Y-%m-%d %H:%M:%S.%e %l **** %t");
spd::set_pattern(" **** %Y-%m-%d %H:%M:%S.%e %l **** %v");
spd::get("console")->warn("This is another message with different format");
}
catch (const spd::spdlog_ex& ex)
{
std::cout << "Log failed: " << ex.what() << std::endl;
}
return 0;
}