Skip to content

Logging in XMPPFramework classes is hard to turn off #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
robertjpayne opened this issue Apr 27, 2012 · 4 comments
Closed

Logging in XMPPFramework classes is hard to turn off #40

robertjpayne opened this issue Apr 27, 2012 · 4 comments

Comments

@robertjpayne
Copy link

If you use CocoaLumberjack elsewhere in your project it is difficult to turn off XMPP logging without currently going through each file and modifying the log level.

XMPPFramework should not use #if DEBUG to determine its logging but rather an internal #DEFINE.

@robbiehanson
Copy link
Owner

Now you can just do this (in XMPPLogging.h):

#define XMPP_LOGGING_ENABLED 0

@robertjpayne
Copy link
Author

May I suggest a small amendment:

#ifndef XMPP_LOGGING_ENABLED
#define XMPP_LOGGING_ENABLED 1
#endif

My goal is to not have to modify XMPP framework at all so I can include the framework and do updates against the main repository without having to "patch" in changes every time.

This change would allow you to define it in a .pch header before XMPP is included and override the default

@robbiehanson
Copy link
Owner

Great idea!

@robbiehanson robbiehanson reopened this Apr 28, 2012
robbiehanson added a commit that referenced this issue May 4, 2012
@chen182459312
Copy link

Hi, Robbie Hanson, I used the TurnSocket to transmit file, my server is ejabberd. I test the iChat and Adium can be transmit file. but when I used the iPhone simulator, the "- (void)turnSocketDidFail:(TURNSocket *)sender" was called every times. first, I must set the proxy server array? second, i must use the full JID to receiver name?
there is my code:
NSArray * array = [NSArray arrayWithObjects:@"conference.mini.local",@"pubsub.mini.local", @"vjud.mini.local", nil]; //
[TURNSocket setProxyCandidates: array];
XMPPJID *jid = [XMPPJID jidWithString : @"[email protected]/mini" ];
_objTURNSocket = [[TURNSocket alloc] initWithStream:_xmppStream toJID: jid ];
[_objTURNSocket startWithDelegate:self delegateQueue:dispatch_get_main_queue() ];
the proxy servers is when I was send this:
-(BOOL)getProxyServers
{

NSError *error = nil;
NSString *strXML = @"<iq type='get'\
from='[email protected]'\
to='mini.local'\
id='server_items'>\
<query xmlns='http://jabber.org/protocol/disco#items'/>\
</iq>" ;
NSXMLElement *qust = [[NSXMLElement alloc] initWithXMLString: strXML error: &error ];
NSLog(@"err :%@", error);
[_xmppStream sendElement:qust];

} and the, I receive the items: @"conference.mini.local",@"pubsub.mini.local", @"vjud.mini.local"

davidchiles pushed a commit to davidchiles/XMPPFramework that referenced this issue Jan 26, 2016
davidchiles pushed a commit to davidchiles/XMPPFramework that referenced this issue Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants