summaryrefslogtreecommitdiffstats
path: root/src/common/ostream_temp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/ostream_temp.cc')
-rw-r--r--src/common/ostream_temp.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/ostream_temp.cc b/src/common/ostream_temp.cc
new file mode 100644
index 000000000..61ae5b741
--- /dev/null
+++ b/src/common/ostream_temp.cc
@@ -0,0 +1,15 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#include "common/ostream_temp.h"
+
+OstreamTemp::OstreamTemp(clog_type type_, OstreamTempSink *parent_)
+ : type(type_), parent(parent_)
+{
+}
+
+OstreamTemp::~OstreamTemp()
+{
+ if (ss.peek() != EOF && parent)
+ parent->do_log(type, ss);
+}