summaryrefslogtreecommitdiff
path: root/platform/darwin/src/logging_nslog.mm
blob: dd428f56b1752b37104b11eed77eff81df10991d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <mbgl/util/logging.hpp>
#include <mbgl/util/enum.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] %@", Enum<EventSeverity>::toString(severity), message);
}

}