File: ostream.cpp

package info (click to toggle)
libwibble 1.1-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,040 kB
  • ctags: 2,721
  • sloc: cpp: 14,542; makefile: 196; perl: 87; sh: 26
file content (18 lines) | stat: -rw-r--r-- 288 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <wibble/log/ostream.h>

namespace wibble {
namespace log {

OstreamSender::OstreamSender(std::ostream& out) : out(out) {}

void OstreamSender::send(Level level, const std::string& msg)
{
	out << msg << std::endl;
	if (level >= WARN)
		out.flush();
}
	
}
}

// vim:set ts=4 sw=4: