summaryrefslogtreecommitdiff
path: root/platform/darwin/log_nslog.mm
blob: a2e31968ab1c957f4343c5a4cc1d0ab8394f8ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <mbgl/platform/log.hpp>

#import <Foundation/Foundation.h>

namespace mbgl {

void Log::platformRecord(EventSeverity severity, const std::string &msg) {
    NSString *message =
        [[NSString alloc] initWithBytes:msg.data() length:msg.size() encoding:NSUTF8StringEncoding];
    NSLog(@"[%s] %@", EventSeverityClass(severity).c_str(), message);
}

}