We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d873f38 + 145b923 commit 6e51652Copy full SHA for 6e51652
lib/Support/Logging-Mac.mm
@@ -16,9 +16,11 @@
16
#import <Foundation/Foundation.h>
17
18
void IndexStoreDB::Log_impl(const char *loggerName, const char *message) {
19
- // Using NSLog instead of stderr, to avoid interleaving with other log output in the process.
20
- // NSLog also logs to asl.
21
- NSLog(@"%s: %s", loggerName, message);
+ // Using NSLog instead of stderr, to avoid interleaving with other log output
+ // in the process. NSLog also logs to asl. Note that we need to print as an
+ // NSString here, since printing the C string with '%s' would use the default
22
+ // system encoding instead of UTF-8.
23
+ NSLog(@"%s: %@", loggerName, [NSString stringWithUTF8String:message]);
24
}
25
26
#endif
0 commit comments