Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick Jung committed Jun 11, 2015
1 parent f1dd174 commit f1e565b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions Classes/LIOLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// THE SOFTWARE.

#import <Foundation/Foundation.h>
#import "DDLog.h"
#import "CocoaLumberjack.h"
#import "DDLogMacros.h"
#import "GCDAsyncSocket.h"

@interface LIOLogger : DDAbstractLogger <DDLogger, GCDAsyncSocketDelegate>
Expand All @@ -32,4 +33,4 @@
@property (nonatomic, copy) NSString *host;
@property (nonatomic, assign) NSUInteger port;

@end
@end
16 changes: 8 additions & 8 deletions Classes/LIOLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ - (BOOL) initialize {

if (!self.wasInitialized) {
self.calendarUnitFlags = (NSCalendarUnitYear |
NSCalendarUnitMonth |
NSCalendarUnitDay |
NSCalendarUnitHour |
NSCalendarUnitMinute |
NSCalendarUnitSecond);
NSCalendarUnitMonth |
NSCalendarUnitDay |
NSCalendarUnitHour |
NSCalendarUnitMinute |
NSCalendarUnitSecond);

self.streamList = @{
@(DDLogFlagError) : @"error",
Expand All @@ -69,7 +69,7 @@ - (BOOL) initialize {
@(DDLogFlagVerbose) : @"verbose",
};

NSLog(@"[log.io] connecting to %@:%d", self.host, self.port);
NSLog(@"[log.io] connecting to %@:%ld", self.host, (long) self.port);

self.tcpSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()];
NSError *error = nil;
Expand Down Expand Up @@ -118,9 +118,9 @@ - (void) logMessage:(DDLogMessage *)logMessage {

if (logMessage && self.streamList[@(logMessage->_flag)] != nil) {
NSString *message = _logFormatter ? [_logFormatter formatLogMessage:logMessage] : logMessage->_message;
[self sendRequest:[NSString stringWithFormat:@"+log|%@|%@|%d|%@ %@\r\n", self.streamList[@(logMessage->_flag)],
[self sendRequest:[NSString stringWithFormat:@"+log|%@|%@|%ld|%@ %@\r\n", self.streamList[@(logMessage->_flag)],
self.nodeName,
logMessage->_flag,
(long) logMessage->_flag,
[self getMessageDateTimeString:logMessage],
message]];
}
Expand Down

0 comments on commit f1e565b

Please sign in to comment.