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

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

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

Postby intomo » 04 Feb 2011, 20:51

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

Postby rahulvyas » 09 Feb 2011, 04:04

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.

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 9 guests