Merge branch 'master' of github.com:KjellKod/g3log into API_Documentation

Conflicts:
	test_unit/test_io.cpp
This commit is contained in:
Kjell Hedsröm 2015-11-23 23:12:30 -07:00
commit 2cef7cb174
2 changed files with 9 additions and 4 deletions

View File

@ -23,12 +23,17 @@ SET(ACTIVE_CPP0xx_DIR "Release")
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
MESSAGE("")
MESSAGE("cmake for Clang ")
IF (APPLE)
SET(CMAKE_CXX_FLAGS "-Wall -std=c++11 -stdlib=libc++ -Wunused -D_GLIBCXX_USE_NANOSLEEP")
IF (${CMAKE_SYSTEM} MATCHES "FreeBSD-([0-9]*)\\.(.*)")
IF (${CMAKE_MATCH_1} GREATER 9)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
set(PLATFORM_LINK_LIBRIES execinfo)
ENDIF()
ELSEIF (APPLE)
set(PLATFORM_LINK_LIBRIES c++abi)
ELSE()
set(PLATFORM_LINK_LIBRIES rt c++abi)
ENDIF()
SET(CMAKE_CXX_FLAGS "-Wall -std=c++11 -stdlib=libc++ -Wunused -D_GLIBCXX_USE_NANOSLEEP")

View File

@ -51,7 +51,7 @@ namespace g3 {
// The actual log receiving function
void FileSink::fileWrite(LogMessageMover message) {
std::ofstream &out(filestream());
out << message.get().toString();
out << message.get().toString() << std::flush;
}
std::string FileSink::changeLogFile(const std::string &directory) {