summaryrefslogtreecommitdiff
path: root/common/nslog_log.mm
diff options
context:
space:
mode:
Diffstat (limited to 'common/nslog_log.mm')
-rw-r--r--common/nslog_log.mm39
1 files changed, 0 insertions, 39 deletions
diff --git a/common/nslog_log.mm b/common/nslog_log.mm
deleted file mode 100644
index 12230143ac..0000000000
--- a/common/nslog_log.mm
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "nslog_log.hpp"
-
-#import <Foundation/Foundation.h>
-
-#include <cstdarg>
-
-namespace mbgl {
-
-void NSLogBackend::record(EventSeverity severity, Event event, const std::string &msg) {
- NSLog(@"[%s] %s: %@", EventSeverityClass(severity).c_str(), EventClass(event).c_str(),
- [[NSString alloc] initWithBytes:msg.data()
- length:msg.size()
- encoding:NSUTF8StringEncoding]);
-}
-
-
-void NSLogBackend::record(EventSeverity severity, Event event, const char* format, ...) {
- va_list args;
- va_start(args, format);
- const size_t len = vsnprintf(NULL, 0, format, args);
- va_end(args);
- std::unique_ptr<char[]> buffer(new char[len + 1]);
- va_start(args, format);
- vsnprintf(buffer.get(), len + 1, format, args);
- va_end(args);
- NSLog(@"[%s] %s: %s", EventSeverityClass(severity).c_str(), EventClass(event).c_str(), buffer.get());
-}
-
-void NSLogBackend::record(EventSeverity severity, Event event, int64_t code) {
- NSLog(@"[%s] %s: (%lld)", EventSeverityClass(severity).c_str(), EventClass(event).c_str(), code);
-}
-
-void NSLogBackend::record(EventSeverity severity, Event event, int64_t code, const std::string &msg) {
- NSLog(@"[%s] %s: (%lld) %@", EventSeverityClass(severity).c_str(), EventClass(event).c_str(), code,
- [[NSString alloc] initWithBytes:msg.data()
- length:msg.size()
- encoding:NSUTF8StringEncoding]);
-}
-}