wip
This commit is contained in:
		
							parent
							
								
									f809427575
								
							
						
					
					
						commit
						005450ff13
					
				| @ -59,7 +59,8 @@ message(STATUS "Static lib: " ${SPDLOG_STATIC_LIB}) | ||||
| 
 | ||||
| if(SPDLOG_STATIC_LIB) | ||||
|     add_definitions(-DSPDLOG_STATIC_LIB) | ||||
|     file(GLOB SRC_FILES ${HEADER_BASE}/impl/*.cpp) | ||||
|     set(SRC_BASE "${CMAKE_CURRENT_SOURCE_DIR}/src") | ||||
|     set(SRC_FILES "${SRC_BASE}/spdlog.cpp" "${SRC_BASE}/format.cc") | ||||
|     add_library(spdlog STATIC ${SRC_FILES}) | ||||
|     target_include_directories(spdlog PUBLIC  "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>") | ||||
|     target_link_libraries(spdlog -Wl,--as-needed) | ||||
|  | ||||
| @ -5,17 +5,14 @@ | ||||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| // Very fast asynchronous logger (millions of logs per second on an average
 | ||||
| // desktop)
 | ||||
| // Uses pre allocated lockfree queue for maximum throughput even under large
 | ||||
| // number of threads.
 | ||||
| // Fast asynchronous logger.
 | ||||
| // Uses pre allocated queue.
 | ||||
| // Creates a single back thread to pop messages from the queue and log them.
 | ||||
| //
 | ||||
| // Upon each log write the logger:
 | ||||
| //    1. Checks if its log level is enough to log the message
 | ||||
| //    2. Push a new copy of the message to a queue (or block the caller until
 | ||||
| //    space is available in the queue)
 | ||||
| //    3. will throw spdlog_ex upon log exceptions
 | ||||
| // Upon destruction, logs all remaining messages in the queue before
 | ||||
| // destructing..
 | ||||
| 
 | ||||
|  | ||||
| @ -341,5 +341,5 @@ protected: | ||||
| } // namespace spdlog
 | ||||
| 
 | ||||
| #ifndef SPDLOG_STATIC_LIB | ||||
| #include "logger-inl.h | ||||
| #include "logger-inl.h" | ||||
| #endif | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| #include  <mutex> | ||||
| #include "spdlog/spdlog.h" | ||||
| 
 | ||||
| #include "spdlog/details/null_mutex.h" | ||||
| 
 | ||||
| #include "spdlog/logger.h" | ||||
| @ -7,9 +8,6 @@ | ||||
| #include "spdlog/async_logger.h" | ||||
| #include "spdlog/async_logger-inl.h" | ||||
| 
 | ||||
| #include "spdlog/async_logger.h" | ||||
| #include "spdlog/async_logger-inl.h" | ||||
| 
 | ||||
| #include "spdlog/details/log_msg.h" | ||||
| #include "spdlog/details/log_msg-inl.h" | ||||
| 
 | ||||
| @ -42,7 +40,6 @@ template class spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>; | ||||
| 
 | ||||
| #include "spdlog/sinks/ansicolor_sink.h" | ||||
| #include "spdlog/sinks/ansicolor_sink-inl.h" | ||||
| // template instantiate stdout_mt, stdout_st, stderr_mt, stderr_st
 | ||||
| template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_mutex>; | ||||
| template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_nullmutex>; | ||||
| template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, spdlog::details::console_mutex>; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user