framework compatible CocoaLumberjack import
With previous import style, the `LOG_ASYNC_ENABLED, LOG_LEVEL_DEF` macros were not being defined. @import style module includes are handled differently in ObjC++, causing problems with out millisecondTimeStamp implementation. Rather than address that problem head on, I simple reimplemented our millisecond timestamp method in objective-c, removing our single ObjC++ file. // FREEBIE
This commit is contained in:
parent
7894a58769
commit
c5b0f7cd01
|
@ -7,8 +7,8 @@
|
|||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CocoaLumberjack/CocoaLumberjack.h>
|
||||
|
||||
@import CocoaLumberjack;
|
||||
#ifdef DEBUG
|
||||
static const NSUInteger ddLogLevel = DDLogLevelAll;
|
||||
#else
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#import "OWSAnalytics.h"
|
||||
#import "OWSDispatch.h"
|
||||
#import "iOSVersions.h"
|
||||
#import <CocoaLumberjack/CocoaLumberjack.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@import CocoaLumberjack;
|
||||
|
||||
#ifdef DEBUG
|
||||
static const NSUInteger ddLogLevel = DDLogLevelAll;
|
||||
#else
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
//
|
||||
|
||||
#import "NSDate+OWS.h"
|
||||
#import <chrono>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
@ -11,9 +10,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
+ (uint64_t)ows_millisecondTimeStamp
|
||||
{
|
||||
uint64_t milliseconds
|
||||
= (uint64_t)(std::chrono::system_clock::now().time_since_epoch() / std::chrono::milliseconds(1));
|
||||
return milliseconds;
|
||||
NSDate *now = [self new];
|
||||
return (uint64_t)(now.timeIntervalSince1970 * 1000);
|
||||
}
|
||||
|
||||
+ (NSDate *)ows_dateWithMillisecondsSince1970:(uint64_t)milliseconds
|
Loading…
Reference in New Issue