]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
log: clear thread-local stream's ios flags on reuse 20174/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 29 Jan 2018 22:12:43 +0000 (17:12 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 30 Jan 2018 14:28:01 +0000 (09:28 -0500)
commit95ad024c3cf0835b65068563d506f87af884f8dc
tree2193e73d1ddd6e5bfa5381e7dd7fcb07e40101a9
parenta6bf362d3c4e9eb8192860f8abeac622d896e825
log: clear thread-local stream's ios flags on reuse

when reusing a thread-local std::ostream for a new log entry, clear any
ios flags (ie eofbit/failbit/badbit) that may have been set during its
previous use

without this, any stream errors (for example, passing a nullptr to
operator<< sets the badbit) will result in all log output on that thread
to be blank for the remainder of the process

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/CachedPrebufferedStreambuf.cc