Skip to content
Snippets Groups Projects
Commit d8141ee7 authored by George Nachman's avatar George Nachman
Browse files

Remove tmux logging

parent 7db23554
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -60,6 +60,17 @@
#define DEBUG_KEYDOWNDUMP 0
#define ASK_ABOUT_OUTDATED_FORMAT @"AskAboutOutdatedKeyMappingForGuid%@"
 
#ifdef TMUX_VERBOSE_LOGGING
#define TmuxLog NSLog
#else
#define TmuxLog(args...) \
do { \
if (gDebugLogging) { \
DebugLog([NSString stringWithFormat:args]); \
} \
} while (0)
#endif
@implementation PTYSession
 
@synthesize futureWindowAffinities = futureWindowAffinities_;
Loading
Loading
@@ -3603,7 +3614,7 @@ static long long timeInTenthsOfSeconds(struct timeval t)
if (EXIT) {
return;
}
NSLog(@"Write to tmux: \"%@\"", [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]);
TmuxLog(@"Write to tmux: \"%@\"", [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]);
if (tmuxLogging_) {
[self printTmuxMessage:[[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]];
}
Loading
Loading
Loading
Loading
@@ -8,6 +8,18 @@
#import "TmuxGateway.h"
#import "RegexKitLite.h"
#import "TmuxController.h"
#import "iTermApplicationDelegate.h"
#ifdef TMUX_VERBOSE_LOGGING
#define TmuxLog NSLog
#else
#define TmuxLog(args...) \
do { \
if (gDebugLogging) { \
DebugLog([NSString stringWithFormat:args]); \
} \
} while (0)
#endif
 
static NSString *kCommandTarget = @"target";
static NSString *kCommandSelector = @"sel";
Loading
Loading
@@ -76,8 +88,8 @@ static NSString *kCommandObject = @"object";
int windowPane = [[components objectAtIndex:1] intValue];
NSString *base64data = [components objectAtIndex:2];
NSData *decodedCommand = [self decodeBase64:base64data];
NSLog(@"Run tmux command: \"%%output %%%d %@", windowPane,
[[[NSString alloc] initWithData:decodedCommand encoding:NSUTF8StringEncoding] autorelease]);
TmuxLog(@"Run tmux command: \"%%output %%%d %@", windowPane,
[[[NSString alloc] initWithData:decodedCommand encoding:NSUTF8StringEncoding] autorelease]);
[[[delegate_ tmuxController] sessionForWindowPane:windowPane] tmuxReadTask:decodedCommand];
state_ = CONTROL_STATE_READY;
}
Loading
Loading
@@ -161,9 +173,9 @@ static NSString *kCommandObject = @"object";
command = [command stringByReplacingOccurrencesOfString:@"\r" withString:@""];
if (![command hasPrefix:@"%output "] &&
!currentCommand_) {
NSLog(@"Read tmux command: \"%@\"", command);
TmuxLog(@"Read tmux command: \"%@\"", command);
} else if (currentCommand_) {
NSLog(@"Read command response: \"%@\"", command);
TmuxLog(@"Read command response: \"%@\"", command);
}
// Advance range to include newline so we can chop it off
commandRange.length += newlineRange.length;
Loading
Loading
@@ -184,9 +196,9 @@ static NSString *kCommandObject = @"object";
} else if ([command hasPrefix:@"%window-close"]) {
[self parseWindowCloseCommand:command];
} else if ([command hasPrefix:@"%noop"]) {
NSLog(@"tmux noop: %@", command);
TmuxLog(@"tmux noop: %@", command);
} else if ([command hasPrefix:@"%exit "]) {
NSLog(@"tmux exit message: %@", command);
TmuxLog(@"tmux exit message: %@", command);
[self hostDisconnected];
} else if ([command hasPrefix:@"%error"]) {
[self abortWithErrorMessage:[NSString stringWithFormat:@"Error: %@", command]];
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment