diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index 4ac5dcbe..5e552cce 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -40,7 +40,7 @@ struct default_factory template inline std::shared_ptr create(const std::string &logger_name, SinkArgs &&... sink_args) { - return create_synchronous::create(logger_name, std::forward(sink_args)...); + return default_factory::create(logger_name, std::forward(sink_args)...); } // diff --git a/tests/errors.cpp b/tests/errors.cpp index 0e0375db..9608ccb6 100644 --- a/tests/errors.cpp +++ b/tests/errors.cpp @@ -71,7 +71,7 @@ TEST_CASE("async_error_handler", "[errors]]") std::string filename = "logs/simple_async_log.txt"; { spdlog::init_thread_pool(128, 1); - auto logger = spdlog::create_as("logger", filename, true); + auto logger = spdlog::create_async_logger("logger", filename, true); logger->set_error_handler([=](const std::string &msg) { std::ofstream ofs("logs/custom_err.txt"); if (!ofs) @@ -99,7 +99,7 @@ TEST_CASE("async_error_handler2", "[errors]]") std::string err_msg("This is async handler error message"); { spdlog::init_thread_pool(128, 1); - auto logger = spdlog::create_as("failed_logger"); + auto logger = spdlog::create_async_logger("failed_logger"); logger->set_error_handler([=](const std::string &msg) { std::ofstream ofs("logs/custom_err2.txt"); if (!ofs) diff --git a/tests/includes.h b/tests/includes.h index d3d7d9a8..3c0bec01 100644 --- a/tests/includes.h +++ b/tests/includes.h @@ -12,7 +12,9 @@ #define SPDLOG_TRACE_ON #define SPDLOG_DEBUG_ON +#include "../include/spdlog/spdlog.h" #include "../include/spdlog/async.h" #include "../include/spdlog/sinks/null_sink.h" +#include "../include/spdlog/sinks/file_sinks.h" #include "../include/spdlog/sinks/ostream_sink.h" -#include "../include/spdlog/spdlog.h" + diff --git a/tests/tests.sln b/tests/tests.sln index d224d204..c81a4f9f 100644 --- a/tests/tests.sln +++ b/tests/tests.sln @@ -1,10 +1,76 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2015 -VisualStudioVersion = 14.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2037 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests.vcxproj", "{59A07559-5F38-4DD6-A7FA-DB4153690B42}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "spdlog", "spdlog", "{0C043010-E40A-43B9-A5EA-B931FC8B6EFB}" + ProjectSection(SolutionItems) = preProject + ..\include\spdlog\async.h = ..\include\spdlog\async.h + ..\include\spdlog\async_logger.h = ..\include\spdlog\async_logger.h + ..\include\spdlog\common.h = ..\include\spdlog\common.h + ..\include\spdlog\formatter.h = ..\include\spdlog\formatter.h + ..\include\spdlog\logger.h = ..\include\spdlog\logger.h + ..\include\spdlog\spdlog.h = ..\include\spdlog\spdlog.h + ..\include\spdlog\tweakme.h = ..\include\spdlog\tweakme.h + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "details", "details", "{C8A207B7-6930-4D28-85BB-EA79ADFD7DAC}" + ProjectSection(SolutionItems) = preProject + ..\include\spdlog\details\async_log_helper.h = ..\include\spdlog\details\async_log_helper.h + ..\include\spdlog\details\async_logger_impl.h = ..\include\spdlog\details\async_logger_impl.h + ..\include\spdlog\details\file_helper.h = ..\include\spdlog\details\file_helper.h + ..\include\spdlog\details\log_msg.h = ..\include\spdlog\details\log_msg.h + ..\include\spdlog\details\logger_impl.h = ..\include\spdlog\details\logger_impl.h + ..\include\spdlog\details\mpmc_bounded_q.h = ..\include\spdlog\details\mpmc_bounded_q.h + ..\include\spdlog\details\null_mutex.h = ..\include\spdlog\details\null_mutex.h + ..\include\spdlog\details\os.h = ..\include\spdlog\details\os.h + ..\include\spdlog\details\pattern_formatter_impl.h = ..\include\spdlog\details\pattern_formatter_impl.h + ..\include\spdlog\details\registry.h = ..\include\spdlog\details\registry.h + ..\include\spdlog\details\spdlog_impl.h = ..\include\spdlog\details\spdlog_impl.h + ..\include\spdlog\details\thread_pool.h = ..\include\spdlog\details\thread_pool.h + ..\include\spdlog\details\traits.h = ..\include\spdlog\details\traits.h + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fmt", "fmt", "{6512BA57-E9B9-4971-BC3A-83C784CC59A5}" + ProjectSection(SolutionItems) = preProject + ..\include\spdlog\fmt\fmt.h = ..\include\spdlog\fmt\fmt.h + ..\include\spdlog\fmt\ostr.h = ..\include\spdlog\fmt\ostr.h + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bundled", "bundled", "{F0D4A944-E0C7-4575-8254-06AC92B384E6}" + ProjectSection(SolutionItems) = preProject + ..\include\spdlog\fmt\bundled\format.cc = ..\include\spdlog\fmt\bundled\format.cc + ..\include\spdlog\fmt\bundled\format.h = ..\include\spdlog\fmt\bundled\format.h + ..\include\spdlog\fmt\bundled\LICENSE.rst = ..\include\spdlog\fmt\bundled\LICENSE.rst + ..\include\spdlog\fmt\bundled\ostream.cc = ..\include\spdlog\fmt\bundled\ostream.cc + ..\include\spdlog\fmt\bundled\ostream.h = ..\include\spdlog\fmt\bundled\ostream.h + ..\include\spdlog\fmt\bundled\posix.cc = ..\include\spdlog\fmt\bundled\posix.cc + ..\include\spdlog\fmt\bundled\posix.h = ..\include\spdlog\fmt\bundled\posix.h + ..\include\spdlog\fmt\bundled\printf.cc = ..\include\spdlog\fmt\bundled\printf.cc + ..\include\spdlog\fmt\bundled\printf.h = ..\include\spdlog\fmt\bundled\printf.h + ..\include\spdlog\fmt\bundled\time.h = ..\include\spdlog\fmt\bundled\time.h + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sinks", "sinks", "{093AE34A-B617-467E-8F31-3C5A85EF51EB}" + ProjectSection(SolutionItems) = preProject + ..\include\spdlog\sinks\android_sink.h = ..\include\spdlog\sinks\android_sink.h + ..\include\spdlog\sinks\ansicolor_sink.h = ..\include\spdlog\sinks\ansicolor_sink.h + ..\include\spdlog\sinks\base_sink.h = ..\include\spdlog\sinks\base_sink.h + ..\include\spdlog\sinks\dist_sink.h = ..\include\spdlog\sinks\dist_sink.h + ..\include\spdlog\sinks\file_sinks.h = ..\include\spdlog\sinks\file_sinks.h + ..\include\spdlog\sinks\msvc_sink.h = ..\include\spdlog\sinks\msvc_sink.h + ..\include\spdlog\sinks\null_sink.h = ..\include\spdlog\sinks\null_sink.h + ..\include\spdlog\sinks\ostream_sink.h = ..\include\spdlog\sinks\ostream_sink.h + ..\include\spdlog\sinks\sink.h = ..\include\spdlog\sinks\sink.h + ..\include\spdlog\sinks\stdout_color_sinks.h = ..\include\spdlog\sinks\stdout_color_sinks.h + ..\include\spdlog\sinks\stdout_sinks.h = ..\include\spdlog\sinks\stdout_sinks.h + ..\include\spdlog\sinks\syslog_sink.h = ..\include\spdlog\sinks\syslog_sink.h + ..\include\spdlog\sinks\wincolor_sink.h = ..\include\spdlog\sinks\wincolor_sink.h + ..\include\spdlog\sinks\windebug_sink.h = ..\include\spdlog\sinks\windebug_sink.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -25,4 +91,13 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C8A207B7-6930-4D28-85BB-EA79ADFD7DAC} = {0C043010-E40A-43B9-A5EA-B931FC8B6EFB} + {6512BA57-E9B9-4971-BC3A-83C784CC59A5} = {0C043010-E40A-43B9-A5EA-B931FC8B6EFB} + {F0D4A944-E0C7-4575-8254-06AC92B384E6} = {6512BA57-E9B9-4971-BC3A-83C784CC59A5} + {093AE34A-B617-467E-8F31-3C5A85EF51EB} = {0C043010-E40A-43B9-A5EA-B931FC8B6EFB} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1D363F0E-2DC2-4544-963A-9812679AFF6B} + EndGlobalSection EndGlobal diff --git a/tests/tests.vcxproj b/tests/tests.vcxproj index 286c6979..f13f9f9d 100644 --- a/tests/tests.vcxproj +++ b/tests/tests.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -27,26 +27,26 @@ Application true - v140 + v141 MultiByte Application true - v140 + v141 MultiByte Application false - v140 + v141 true MultiByte Application false - v140 + v141 true MultiByte