From d4e8ab4f1fe0e44d8246b37c349f566b356636f6 Mon Sep 17 00:00:00 2001 From: badaix Date: Fri, 2 Feb 2018 19:55:32 +0100 Subject: [PATCH] sync buffer on exit --- CMakeLists.txt | 2 +- include/aixlog.hpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fd496e..1528ce5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ project(aixlog_test) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS OFF) -set(PROJECT_VERSION "1.0.3") +set(PROJECT_VERSION "1.0.4") include_directories( diff --git a/include/aixlog.hpp b/include/aixlog.hpp index 369c956..415cf69 100644 --- a/include/aixlog.hpp +++ b/include/aixlog.hpp @@ -3,7 +3,7 @@ / _\ ( )( \/ )( ) / \ / __) / \ )( ) ( / (_/\( O )( (_ \ \_/\_/(__)(_/\_)\____/ \__/ \___/ - version 1.0.3 + version 1.0.4 https://github.com/badaix/aixlog This file is part of aixlog @@ -538,6 +538,11 @@ class Log : public std::basic_streambuf > { } + virtual ~Log() + { + sync(); + } + int sync() override { std::lock_guard lock(mutex_);