How do I turn off all the logging on the iphone client?

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

Post Reply
intomo
Posts: 51
Joined: 22 Nov 2010, 21:21
Location: Los Angeles

How do I turn off all the logging on the iphone client?

Post by intomo »

How do I turn off all the logging on the iphone client? Is there a way to turn it all off? Thanks.
rahulvyas
Posts: 19
Joined: 05 Jul 2010, 05:23
Location: Jaipur,Rajasthan
Contact:

Answer for your query

Post by rahulvyas »

There is a variable named _debug in INFSmartFoxiPhoneClient.h

Create a property of that variable like this

@property (assign) BOOL debug;

@synthesize debug in .m file

and where you start your connection modify the code to disable debugging

Here is the code snippet of mine.

Code: Select all

//Connects to Smart Fox Server
- (void)connectToSFSServer {
	
	// Initialize sfs server connection
	self.smartFox = [[INFSmartFoxiPhoneClient iPhoneClient:YES delegate:self] retain];
	
#if EnableSFSLogging > 0
	//Enable debug messages
	[self.smartFox setDebug:YES];
#else
	//Disable debug messages
	[self.smartFox setDebug:NO];
#endif
	
	[INFSmartFoxObjectSerializer setDebug:YES];
	[self.smartFox loadConfig:@"config" autoConnect:YES];
}
Thanks & Regards,
Rahul Vyas,
iPhone Developer.
Post Reply