GT2/Ejectable/node_modules/react-native-reanimated/ios/native/REAIOSLogger.mm

26 lines
597 B
Plaintext
Raw Normal View History

2021-08-16 00:14:59 +00:00
#include "REAIOSLogger.h"
#import <Foundation/Foundation.h>
namespace reanimated {
std::unique_ptr<LoggerInterface> Logger::instance = std::make_unique<REAIOSLogger>();
void REAIOSLogger::log(const char* str) {
NSLog(@"%@", [NSString stringWithCString:str encoding:[NSString defaultCStringEncoding]]);
}
void REAIOSLogger::log(double d) {
NSLog(@"%lf", d);
}
void REAIOSLogger::log(int i) {
NSLog(@"%i", i);
}
void REAIOSLogger::log(bool b) {
const char* str = (b)? "true" : "false";
NSLog(@"%@", [NSString stringWithCString:str encoding:[NSString defaultCStringEncoding]]);
}
}