ios - Get iPhone Logs(not crash logs) -
i have couple of nslog statements in app. in xcode can track nslog() in console. when client runs app 1 of label value not displaying in ui. problem not able replicate issue @ all.
now want client send log when faces issue. know how crash logs. want log have result of nslog() statements when client runs app in iphone.
hope above problem clear. there way such logs?any suggestions guys?
thanks.
got breakthrough!!. need re-direct nslog file , access file.
- (void)redirectnslogtodocumentfolder{ nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory,nsuserdomainmask, yes); nsstring *documentsdirectory = [paths objectatindex:0]; nsstring *filename =[nsstring stringwithformat:@"%@.log",[nsdate date]]; nsstring *logfilepath = [documentsdirectory stringbyappendingpathcomponent:filename]; freopen([logfilepath cstringusingencoding:nsasciistringencoding],"a+",stderr); }
http://objcolumnist.com/2009/12/19/redirecting-nslog-to-a-log-file/
Comments
Post a Comment