diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-11 14:34:17 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-11 14:34:17 -0700 |
commit | 7ffe4a7858bc5d071b87612bdaa19d8eaf29045c (patch) | |
tree | 701750687b9331dcd290d9831ad8b62be9a97cae /common/stderr_log.cpp | |
parent | f3c55eba9da59042a96e683f841060674519520b (diff) | |
download | qtlocation-mapboxgl-7ffe4a7858bc5d071b87612bdaa19d8eaf29045c.tar.gz |
add nslog and stderr log backends
Diffstat (limited to 'common/stderr_log.cpp')
-rw-r--r-- | common/stderr_log.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/common/stderr_log.cpp b/common/stderr_log.cpp new file mode 100644 index 0000000000..b3b1fea333 --- /dev/null +++ b/common/stderr_log.cpp @@ -0,0 +1,20 @@ +#include "stderr_log.hpp" + +#include <iostream> + +namespace llmr { + +void StderrLogBackend::record(EventSeverity severity, Event event, const std::string &msg) { + std::cerr << "[" << severity << "] " << event << ": " << msg << std::endl; +} + +void StderrLogBackend::record(EventSeverity severity, Event event, int64_t code) { + std::cerr << "[" << severity << "] " << event << ": (" << code << ")" << std::endl; +} + +void StderrLogBackend::record(EventSeverity severity, Event event, int64_t code, const std::string &msg) { + std::cerr << "[" << severity << "] " << event << ": (" << code << ") " << msg << std::endl; + +} + +} |