diff --git a/dune/stuff/common/logstreams.cc b/dune/stuff/common/logstreams.cc index e3831ec748eda007cca97eb3a6d846cc9ae3a93e..7872f7bcd918e8614c33238f52415baa164f10a3 100644 --- a/dune/stuff/common/logstreams.cc +++ b/dune/stuff/common/logstreams.cc @@ -59,6 +59,12 @@ SuspendableStrBuffer::int_type SuspendableStrBuffer::overflow(SuspendableStrBuff return traits_type::eof() + 1; } +int SuspendableStrBuffer::pubsync() +{ + if (enabled()) + return BaseType::pubsync(); + return 0; +} LogStream& LogStream::flush() { diff --git a/dune/stuff/common/logstreams.hh b/dune/stuff/common/logstreams.hh index 929db4085c1ee738848bed12fec955dcb7e65e52..3b9cf422d451fb62fe7e3f44dcc0f5031e162e3a 100644 --- a/dune/stuff/common/logstreams.hh +++ b/dune/stuff/common/logstreams.hh @@ -57,6 +57,8 @@ protected: virtual int_type overflow(int_type ch = traits_type::eof()); private: + int pubsync(); + inline bool enabled() const { return (!is_suspended_) && (logflags_ & loglevel_);