Fixed bugs in stdout_sinks and in msvc

This commit is contained in:
gabime
2018-07-07 14:04:31 +03:00
parent bde4c7149f
commit 9dc44c39e7
14 changed files with 59 additions and 76 deletions

View File

@@ -1,5 +1,5 @@
CXX = g++
CXX_FLAGS = -Wall -Wextra -pedantic -std=c++11 -pthread -I../include
CXX_FLAGS = -Wall -Wextra -pedantic -std=c++11 -pthread -I../include -fmax-errors=1
CXX_RELEASE_FLAGS = -O3 -march=native
CXX_DEBUG_FLAGS= -g

View File

@@ -55,16 +55,16 @@ int main(int, char *[])
}
}
#include "spdlog/sinks/stdout_color_sinks.h" // or "/sinks/stdout_sinks.h" if no colors needed
#include "spdlog/sinks/stdout_sinks.h" // or "/sinks/stdout_sinks.h" if no colors needed
void stdout_example()
{
// create color multi threaded logger
auto console = spdlog::stdout_color_mt("console");
auto console = spdlog::stdout_logger_mt("console");
console->info("Welcome to spdlog!");
console->error("Some error message with arg: {}", 1);
auto err_logger = spdlog::stderr_color_mt("error_logger");
auto err_logger = spdlog::stderr_logger_mt("error_logger");
err_logger->error("Some error message");
// Formatting examples
console->warn("Easy padding in numbers like {:08d}", 12);