Skip to content

Commit

Permalink
Merge pull request #236 from DyKnow/feature-dev
Browse files Browse the repository at this point in the history
Adds Optional CocoaLumberjack Support
  • Loading branch information
Alex Billingsley committed Feb 5, 2016
2 parents f1c0eb6 + d2b01a9 commit c4ae869
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 166 deletions.
25 changes: 17 additions & 8 deletions SignalR-ObjC.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
Pod::Spec.new do |s|
s.default_subspec = 'Core'
s.name = "SignalR-ObjC"
s.version = "2.0.0.beta3"
s.version = "2.0.0.beta5"
s.summary = "Objective-C Client for the SignalR Project works with iOS and Mac."
s.homepage = "https://github.com/DyKnow/SignalR-ObjC"
s.license = 'MIT'
s.author = { "Alex Billingsley" => "[email protected]" }
s.source = { :git => 'https://github.com/DyKnow/SignalR-ObjC.git', :tag => '2.0.0.beta3' }
s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.8'
s.source_files = 'SignalR.Client/**/*.{h,m}'
s.source = { :git => 'https://github.com/DyKnow/SignalR-ObjC.git', :tag => '2.0.0.beta5' }
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.requires_arc = true
s.dependency 'AFNetworking', '~>2.0'
s.dependency 'SocketRocket', '0.4'
end

s.subspec 'Core' do |sp|
sp.source_files = 'SignalR.Client/**/*.{h,m}'
sp.dependency 'AFNetworking', '~>2.0'
sp.dependency 'SocketRocket', '~>0.4'
end

s.subspec 'CocoaLumberjack' do |sp|
sp.dependency 'CocoaLumberjack', '~1.0'
sp.dependency 'SignalR-ObjC/Core'
end
end
2 changes: 1 addition & 1 deletion SignalR.Client/Hubs/SRHubConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ - (void)commonInit {
[NSException raise:NSInternalInconsistencyException format:NSLocalizedString(@"Proxies cannot be added after the connection has been started.",@"NSInternalInconsistencyException")];
}

SRLogConnection(@"will create proxy %@",hubName);
SRLogConnectionDebug(@"will create proxy %@",hubName);

SRHubProxy *hubProxy;
if(_hubs[[hubName lowercaseString]] == nil) {
Expand Down
2 changes: 1 addition & 1 deletion SignalR.Client/Hubs/SRHubProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (void)invokeEvent:(NSString *)eventName withArgs:(NSArray *)args {
NSUInteger numberOfArguments = [signature numberOfArguments] - 2;

if (args.count != numberOfArguments) {
SRLogConnection(@"Callback for event '%@' is configured with %ld arguments, received %ld parameters instead.",eventName, (unsigned long)numberOfArguments, (unsigned long)args.count);
SRLogConnectionInfo(@"Callback for event '%@' is configured with %ld arguments, received %ld parameters instead.",eventName, (unsigned long)numberOfArguments, (unsigned long)args.count);
}

[invocation setSelector:eventObj.selector];
Expand Down
24 changes: 20 additions & 4 deletions SignalR.Client/SRConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ - (void)start:(id <SRClientTransportInterface>)transport {
}

- (void)negotiate:(id<SRClientTransportInterface>)transport {
SRLogConnection(@"will negotiate");
SRLogConnectionDebug(@"will negotiate");

_connectionData = [self onSending];

__weak __typeof(&*self)weakSelf = self;
[transport negotiate:self connectionData:_connectionData completionHandler:^(SRNegotiationResponse *negotiationResponse, NSError *error) {
__strong __typeof(&*weakSelf)strongSelf = weakSelf;
if (!error) {
SRLogConnection(@"negotiation was successful %@",negotiationResponse);
SRLogConnectionInfo(@"negotiation was successful %@",negotiationResponse);

[strongSelf verifyProtocolVersion:negotiationResponse.protocolVersion];

Expand All @@ -151,7 +151,7 @@ - (void)negotiate:(id<SRClientTransportInterface>)transport {

[strongSelf startTransport];
} else {
SRLogConnection(@"negotiation failed %@", error);
SRLogConnectionError(@"negotiation failed %@", error);
[strongSelf didReceiveError:error];
[strongSelf didClose];
}
Expand All @@ -161,12 +161,15 @@ - (void)negotiate:(id<SRClientTransportInterface>)transport {
- (void)startTransport {
__weak __typeof(&*self)weakSelf = self;

SRLogConnectionDebug(@"will start transport");
[self.transport start:self connectionData:_connectionData completionHandler:^(id response, NSError *error) {
__strong __typeof(&*weakSelf)strongSelf = weakSelf;
if (!error) {
SRLogConnectionInfo(@"start transport was successful");
[strongSelf changeState:connecting toState:connected];

if (_keepAliveData != nil && [_transport supportsKeepAlive]) {
SRLogConnectionDebug(@"connection starting keepalive monitor");
[_monitor start];
}

Expand All @@ -177,6 +180,7 @@ - (void)startTransport {
[strongSelf.delegate SRConnectionDidOpen:strongSelf];
}
} else {
SRLogConnectionError(@"start transport failed %@",error);
[strongSelf didReceiveError:error];
[strongSelf didClose];
}
Expand All @@ -189,6 +193,8 @@ - (BOOL)changeState:(connectionState)oldState toState:(connectionState)newState
if (self.state == oldState) {
self.state = newState;

SRLogConnectionDebug(@"connection state did change from %u to %u", oldState, newState);

if (self.stateChanged){
self.stateChanged(self.state);
}
Expand Down Expand Up @@ -231,9 +237,11 @@ - (void)stop: (NSNumber *) timeout {
// Do nothing if the connection is offline
if (self.state != disconnected) {

SRLogConnectionDebug(@"connection will stop monitoring keepalive");
[_monitor stop];
_monitor = nil;

SRLogConnectionDebug(@"connection will abort transport");
[_transport abort:self timeout:timeout connectionData:_connectionData];
[self disconnect];

Expand Down Expand Up @@ -302,13 +310,15 @@ - (void)send:(id)object completionHandler:(void (^)(id response, NSError *error)
message = [object SRJSONRepresentation];
}

SRLogConnectionDebug(@"connection transport will send %@", message);
[self.transport send:self data:message connectionData:_connectionData completionHandler:block];
}

#pragma mark -
#pragma mark Received Data

- (void)didReceiveData:(id)message {
SRLogConnectionInfo(@"connection did receive data %@",message);
if(self.received != nil) {
self.received(message);
}
Expand All @@ -319,6 +329,7 @@ - (void)didReceiveData:(id)message {
}

- (void)didReceiveError:(NSError *)ex {
SRLogConnectionError(@"connection did receive error %@",ex);
if(self.error != nil) {
self.error(ex);
}
Expand All @@ -329,16 +340,18 @@ - (void)didReceiveError:(NSError *)ex {
}

- (void)willReconnect {

SRLogConnectionDebug(@"connection will reconnect");
// Only allow the client to attempt to reconnect for a _disconnectTimout TimeSpan which is set by
// the server during negotiation.
// If the client tries to reconnect for longer the server will likely have deleted its ConnectionId
// topic along with the contained disconnect message.
__weak __typeof(&*self)weakSelf = self;
self.disconnectTimeoutOperation = [NSBlockOperation blockOperationWithBlock:^{
__strong __typeof(&*weakSelf)strongSelf = weakSelf;
SRLogConnectionWarn(@"connection failed to reconnect");
[strongSelf stopButDoNotCallServer];
}];
SRLogConnectionDebug(@"connection will disconnect if reconnect is not performed in %@",_disconnectTimeout);
[self.disconnectTimeoutOperation performSelector:@selector(start) withObject:nil afterDelay:[_disconnectTimeout integerValue]];

if (self.reconnecting != nil) {
Expand All @@ -351,6 +364,7 @@ - (void)willReconnect {
}

- (void)didReconnect {
SRLogConnectionDebug(@"connection did reconnect");
[NSObject cancelPreviousPerformRequestsWithTarget:self.disconnectTimeoutOperation
selector:@selector(start)
object:nil];
Expand All @@ -368,6 +382,7 @@ - (void)didReconnect {
}

- (void)connectionDidSlow {
SRLogConnectionDebug(@"connection did slow");
if (self.connectionSlow != nil) {
self.connectionSlow();
}
Expand All @@ -378,6 +393,7 @@ - (void)connectionDidSlow {
}

- (void)didClose {
SRLogConnectionDebug(@"connection did close");
if (self.closed != nil) {
self.closed();
}
Expand Down
4 changes: 2 additions & 2 deletions SignalR.Client/SRHeartbeatMonitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ - (void)beat:(NSInteger)timeElapsed {
if (timeElapsed >= [[[_connection keepAliveData] timeout] integerValue]) {
if (!self.timedOut) {
// Connection has been lost
SRLogConnection(@"Connection Timed-out : Transport Lost Connection");
SRLogConnectionWarn(@"Connection Timed-out : Transport Lost Connection");
_timedOut = true;
[[_connection transport] lostConnection:_connection];
}
} else if (timeElapsed >= [[[_connection keepAliveData] timeoutWarning] integerValue]) {
if (!self.hasBeenWarned) {
// Inform user and set HasBeenWarned to true
SRLogConnection(@"Connection Timeout Warning : Notifying user");
SRLogConnectionWarn(@"Connection Timeout Warning : Notifying user");
_beenWarned = true;
[_connection connectionDidSlow];
}
Expand Down
172 changes: 61 additions & 111 deletions SignalR.Client/SRLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,120 +20,70 @@
// DEALINGS IN THE SOFTWARE.
//

#define LOG_FLAG_HTTP (1 << 0) // 0...000001
#define LOG_FLAG_CONNECTION (1 << 1) // 0...000010
#define LOG_FLAG_LONGPOLLING (1 << 2) // 0...000100
#define LOG_FLAG_SERVERSENTEVENTS (1 << 3) // 0...001000
#define LOG_FLAG_HTTPTRANSPORT (1 << 4) // 0...010000
#define LOG_FLAG_WEBSOCKETS (1 << 5) // 0...100000
#define LOG_FLAG_AUTOTRANSPORT (1 << 6) // 0..1000000
#if __has_include("DDLog.h")
#import <CocoaLumberjack/DDLog.h>

#define LOG_LEVEL_OFF 0
#define LOG_LEVEL_HTTP (LOG_FLAG_HTTP) // 0...000001
#define LOG_LEVEL_CONNECTION (LOG_FLAG_CONNECTION | LOG_FLAG_HTTP) // 0...000011
#define LOG_LEVEL_LONGPOLLING (LOG_FLAG_LONGPOLLING | LOG_FLAG_CONNECTION | LOG_FLAG_HTTP) // 0...000111
#define LOG_LEVEL_SERVERSENTEVENTS (LOG_FLAG_SERVERSENTEVENTS | LOG_FLAG_CONNECTION | LOG_FLAG_HTTP) // 0...001011
#define LOG_LEVEL_HTTPTRANSPORT (LOG_FLAG_HTTPTRANSPORT | LOG_FLAG_SERVERSENTEVENTS | LOG_FLAG_LONGPOLLING | LOG_FLAG_CONNECTION | LOG_FLAG_HTTP ) // 0...011111
#define LOG_LEVEL_WEBSOCKETS (LOG_FLAG_WEBSOCKETS | LOG_FLAG_CONNECTION | LOG_FLAG_HTTP ) // 0...011111
#define LOG_LEVEL_AUTOTRANSPORT (LOG_FLAG_AUTOTRANSPORT | LOG_FLAG_HTTPTRANSPORT | LOG_FLAG_SERVERSENTEVENTS | LOG_FLAG_LONGPOLLING | LOG_FLAG_CONNECTION | LOG_FLAG_HTTP ) // 0...111111
static const int ddLogLevel = LOG_LEVEL_VERBOSE;

#define LOG_HTTP (ddLogLevel & LOG_FLAG_HTTP )
#define LOG_CONNECTION (ddLogLevel & LOG_FLAG_CONNECTION )
#define LOG_LONGPOLLING (ddLogLevel & LOG_FLAG_LONGPOLLING )
#define LOG_SERVERSENTEVENTS (ddLogLevel & LOG_FLAG_SERVERSENTEVENTS)
#define LOG_HTTPTRANSPORT (ddLogLevel & LOG_FLAG_HTTPTRANSPORT )
#define LOG_WEBSOCKETS (ddLogLevel & LOG_LEVEL_WEBSOCKETS )
#define LOG_AUTOTRANSPORT (ddLogLevel & LOG_FLAG_AUTOTRANSPORT )
#if defined( LOG_ASYNC_ENABLED )
#undef LOG_ASYNC_ENABLED
#define LOG_ASYNC_ENABLED NO
#endif

static int ddLogLevel = LOG_LEVEL_AUTOTRANSPORT;

#define COCOA_LUMBER_JACK 0
#if COCOA_LUMBER_JACK

#import "DDLog.h"

#undef LOG_FLAG_ERROR
#undef LOG_FLAG_WARN
#undef LOG_FLAG_INFO
#undef LOG_FLAG_VERBOSE

#undef LOG_LEVEL_ERROR
#undef LOG_LEVEL_WARN
#undef LOG_LEVEL_INFO
#undef LOG_LEVEL_VERBOSE

#undef LOG_ERROR
#undef LOG_WARN
#undef LOG_INFO
#undef LOG_VERBOSE

#undef DDLogError
#undef DDLogWarn
#undef DDLogInfo
#undef DDLogVerbose

#undef DDLogCError
#undef DDLogCWarn
#undef DDLogCInfo
#undef DDLogCVerbose

#define SRLogHTTP(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_HTTP, 0, frmt, ##__VA_ARGS__)
#define SRLogConnection(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_CONNECTION, 0, frmt, ##__VA_ARGS__)
#define SRLogLongPolling(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_LONGPOLLING, 0, frmt, ##__VA_ARGS__)
#define SRLogServerSentEvents(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_SERVERSENTEVENTS, 0, frmt, ##__VA_ARGS__)
#define SRLogHTTPTransport(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_HTTPTRANSPORT, 0, frmt, ##__VA_ARGS__)
#define SRLogWebSockets(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_WEBSOCKETS, 0, frmt, ##__VA_ARGS__)
#define SRLogAutoTransport(frmt, ...) SYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_AUTOTRANSPORT, 0, frmt, ##__VA_ARGS__)

#define SRLogCHTTP(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_HTTP, 0, frmt, ##__VA_ARGS__)
#define SRLogCConnection(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_CONNECTION, 0, frmt, ##__VA_ARGS__)
#define SRLogCLongPolling(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_LONGPOLLING, 0, frmt, ##__VA_ARGS__)
#define SRLogCServerSentEvents(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_SERVERSENTEVENTS, 0, frmt, ##__VA_ARGS__)
#define SRLogCHTTPTransport(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_HTTPTRANSPORT, 0, frmt, ##__VA_ARGS__)
#define SRLogCWebSockets(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_WEBSOCKETS, 0, frmt, ##__VA_ARGS__)
#define SRLogCAutoTransport(frmt, ...) SYNC_LOG_C_MAYBE(ddLogLevel, LOG_FLAG_AUTOTRANSPORT, 0, frmt, ##__VA_ARGS__)
#define SRLogError(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_ERROR, LOG_LEVEL_DEF, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__)
#define SRLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN, LOG_LEVEL_DEF, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__)
#define SRLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO, LOG_LEVEL_DEF, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__)
#define SRLogDebug(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_DEBUG, LOG_LEVEL_DEF, LOG_FLAG_DEBUG, 0, frmt, ##__VA_ARGS__)
#define SRLogVerbose(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_VERBOSE, LOG_LEVEL_DEF, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__)

#else

#define SRLogHTTP(fmt, ...) \
do{ \
if(ddLogLevel & LOG_HTTP) \
NSLog((@"Thread %@:%s [Line %d]\n[HTTP] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#define SRLogConnection(fmt, ...) \
do{ \
if(ddLogLevel & LOG_CONNECTION) \
NSLog((@"Thread %@:%s [Line %d]\n[CONNECTION] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#define SRLogLongPolling(fmt, ...) \
do{ \
if(ddLogLevel & LOG_LONGPOLLING) \
NSLog((@"Thread %@:%s [Line %d]\n[LONG_POLLING] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#define SRLogServerSentEvents(fmt, ...) \
do{ \
if(ddLogLevel & LOG_SERVERSENTEVENTS) \
NSLog((@"Thread %@:%s [Line %d]\n[SERVER_SENT_EVENTS] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#define SRLogHTTPTransport(fmt, ...) \
do{ \
if(ddLogLevel & LOG_HTTPTRANSPORT) \
NSLog((@"Thread %@:%s [Line %d]\n[HTTP_BASED_TRANSPORT] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#define SRLogWebSockets(fmt, ...) \
do{ \
if(ddLogLevel & LOG_WEBSOCKETS) \
NSLog((@"Thread %@:%s [Line %d]\n[WEB_SOCKETS] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#define SRLogAutoTransport(fmt, ...) \
do{ if(ddLogLevel & LOG_AUTOTRANSPORT) \
NSLog((@"Thread %@:%s [Line %d]\n[AUTO_TRANSPORT] " fmt), [NSThread currentThread], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while(0)

#endif
#define SRLogError(frmt, ...) do{ NSLog((frmt), ##__VA_ARGS__); } while(0)
#define SRLogWarn(frmt, ...) do{ NSLog((frmt), ##__VA_ARGS__); } while(0)
#define SRLogInfo(frmt, ...) do{ NSLog((frmt), ##__VA_ARGS__); } while(0)
#define SRLogDebug(frmt, ...) do{ NSLog((frmt), ##__VA_ARGS__); } while(0)
#define SRLogVerbose(frmt, ...) do{ NSLog((frmt), ##__VA_ARGS__); } while(0)

#endif

#define SRLogPrefixedError(type, frmt, ...) SRLogError(@"%@:\t%@", type, [NSString stringWithFormat:frmt, ##__VA_ARGS__]);
#define SRLogPrefixedWarn(type, frmt, ...) SRLogWarn(@"%@:\t%@", type, [NSString stringWithFormat:frmt, ##__VA_ARGS__]);
#define SRLogPrefixedInfo(type, frmt, ...) SRLogInfo(@"%@:\t%@", type, [NSString stringWithFormat:frmt, ##__VA_ARGS__]);
#define SRLogPrefixedDebug(type, frmt, ...) SRLogDebug(@"%@:\t%@", type, [NSString stringWithFormat:frmt, ##__VA_ARGS__]);
#define SRLogPrefixedVerbose(type, frmt, ...) SRLogVerboase(@"%@:\t%@", type, [NSString stringWithFormat:frmt, ##__VA_ARGS__]);

#define SRLogConnectionError(frmt, ...) SRLogPrefixedError(@"CONNECTION", frmt, ##__VA_ARGS__);
#define SRLogConnectionWarn(frmt, ...) SRLogPrefixedWarn(@"CONNECTION", frmt, ##__VA_ARGS__);
#define SRLogConnectionInfo(frmt, ...) SRLogPrefixedInfo(@"CONNECTION", frmt, ##__VA_ARGS__);
#define SRLogConnectionDebug(frmt, ...) SRLogPrefixedDebug(@"CONNECTION", frmt, ##__VA_ARGS__);
#define SRLogConnectionVerbose(frmt, ...) SRLogPrefixedVerbose(@"CONNECTION", frmt, ##__VA_ARGS__);

#define SRLogAutoError(frmt, ...) SRLogPrefixedError(@"AUTO", frmt, ##__VA_ARGS__);
#define SRLogAutoWarn(frmt, ...) SRLogPrefixedWarn(@"AUTO", frmt, ##__VA_ARGS__);
#define SRLogAutoInfo(frmt, ...) SRLogPrefixedInfo(@"AUTO", frmt, ##__VA_ARGS__);
#define SRLogAutoDebug(frmt, ...) SRLogPrefixedDebug(@"AUTO", frmt, ##__VA_ARGS__);
#define SRLogAutoVerbose(frmt, ...) SRLogPrefixedVerbose(@"AUTO", frmt, ##__VA_ARGS__);

#define SRLogTransportError(frmt, ...) SRLogPrefixedError(@"TRANSPORT", frmt, ##__VA_ARGS__);
#define SRLogTransportWarn(frmt, ...) SRLogPrefixedWarn(@"TRANSPORT", frmt, ##__VA_ARGS__);
#define SRLogTransportInfo(frmt, ...) SRLogPrefixedInfo(@"TRANSPORT", frmt, ##__VA_ARGS__);
#define SRLogTransportDebug(frmt, ...) SRLogPrefixedDebug(@"TRANSPORT", frmt, ##__VA_ARGS__);
#define SRLogTransportVerbose(frmt, ...) SRLogPrefixedVerbose(@"TRANSPORT", frmt, ##__VA_ARGS__);

#define SRLogWSError(frmt, ...) SRLogPrefixedError(@"WS", frmt, ##__VA_ARGS__);
#define SRLogWSWarn(frmt, ...) SRLogPrefixedWarn(@"WS", frmt, ##__VA_ARGS__);
#define SRLogWSInfo(frmt, ...) SRLogPrefixedInfo(@"WS", frmt, ##__VA_ARGS__);
#define SRLogWSDebug(frmt, ...) SRLogPrefixedDebug(@"WS", frmt, ##__VA_ARGS__);
#define SRLogWSVerbose(frmt, ...) SRLogPrefixedVerbose(@"WS", frmt, ##__VA_ARGS__);

#define SRLogSSEError(frmt, ...) SRLogPrefixedError(@"SSE", frmt, ##__VA_ARGS__);
#define SRLogSSEWarn(frmt, ...) SRLogPrefixedWarn(@"SSE", frmt, ##__VA_ARGS__);
#define SRLogSSEInfo(frmt, ...) SRLogPrefixedInfo(@"SSE", frmt, ##__VA_ARGS__);
#define SRLogSSEDebug(frmt, ...) SRLogPrefixedDebug(@"SSE", frmt, ##__VA_ARGS__);
#define SRLogSSEVerbose(frmt, ...) SRLogPrefixedVerbose(@"SSE", frmt, ##__VA_ARGS__);

#define SRLogLPError(frmt, ...) SRLogPrefixedError(@"LP", frmt, ##__VA_ARGS__);
#define SRLogLPWarn(frmt, ...) SRLogPrefixedWarn(@"LP", frmt, ##__VA_ARGS__);
#define SRLogLPInfo(frmt, ...) SRLogPrefixedInfo(@"LP", frmt, ##__VA_ARGS__);
#define SRLogLPDebug(frmt, ...) SRLogPrefixedDebug(@"LP", frmt, ##__VA_ARGS__);
#define SRLogLPVerbose(frmt, ...) SRLogPrefixedVerbose(@"LP", frmt, ##__VA_ARGS__);
Loading

0 comments on commit c4ae869

Please sign in to comment.