logging: improve the AsyncFileWriter flush test()
[folly.git] / folly / experimental / logging / LogStream.cpp
index 3bf4acf677391329911bef91cd0bd6c18d12841e..6b851099f99f0a1240655011cd9e4cdcad495c19 100644 (file)
@@ -38,7 +38,7 @@ LogStreamBuffer::int_type LogStreamBuffer::overflow(int_type ch) {
       setp((&str_.front()) + currentSize + 1, (&str_.front()) + newSize);
       return ch;
     }
-  } catch (const std::exception& ex) {
+  } catch (const std::exception&) {
     // Return EOF to indicate that the operation failed.
     // In general the only exception we really expect to see here is
     // std::bad_alloc() from the str_.resize() call.
@@ -46,7 +46,8 @@ LogStreamBuffer::int_type LogStreamBuffer::overflow(int_type ch) {
   }
 }
 
-LogStream::LogStream() : std::ostream(nullptr) {
+LogStream::LogStream(LogStreamProcessor* processor)
+    : std::ostream(nullptr), processor_{processor} {
   rdbuf(&buffer_);
 }