Skip to content

Commit

Permalink
sync buffer on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Feb 2, 2018
1 parent f8ece7e commit d4e8ab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
7 changes: 6 additions & 1 deletion include/aixlog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/ _\ ( )( \/ )( ) / \ / __)
/ \ )( ) ( / (_/\( O )( (_ \
\_/\_/(__)(_/\_)\____/ \__/ \___/
version 1.0.3
version 1.0.4
https://github.com/badaix/aixlog
This file is part of aixlog
Expand Down Expand Up @@ -538,6 +538,11 @@ class Log : public std::basic_streambuf<char, std::char_traits<char> >
{
}

virtual ~Log()
{
sync();
}

int sync() override
{
std::lock_guard<std::recursive_mutex> lock(mutex_);
Expand Down

0 comments on commit d4e8ab4

Please sign in to comment.