Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: talk/examples/objc/AppRTCDemo/common/ARDLogging.mm

Issue 1217473011: AppRTCDemo file logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/examples/objc/AppRTCDemo/common/ARDLogging.mm
diff --git a/talk/app/webrtc/dtlsidentityservice.cc b/talk/examples/objc/AppRTCDemo/common/ARDLogging.mm
similarity index 67%
copy from talk/app/webrtc/dtlsidentityservice.cc
copy to talk/examples/objc/AppRTCDemo/common/ARDLogging.mm
index b4b7279c8288395a8e23a507f7c78dc199572cab..8d014821a895f319e53c6ef54b87bc024ee786b5 100644
--- a/talk/app/webrtc/dtlsidentityservice.cc
+++ b/talk/examples/objc/AppRTCDemo/common/ARDLogging.mm
@@ -25,26 +25,25 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "talk/app/webrtc/dtlsidentityservice.h"
+#import "ARDLogging.h"
-#include "talk/app/webrtc/dtlsidentitystore.h"
#include "webrtc/base/logging.h"
-namespace webrtc {
-
-bool DtlsIdentityService::RequestIdentity(
- const std::string& identity_name,
- const std::string& common_name,
- webrtc::DTLSIdentityRequestObserver* observer) {
- if (identity_name != DtlsIdentityStore::kIdentityName ||
- common_name != DtlsIdentityStore::kIdentityName) {
- LOG(LS_WARNING) << "DtlsIdentityService::RequestIdentity called with "
- << "unsupported params, identity_name=" << identity_name
- << ", common_name=" << common_name;
- return false;
+void ARDLogToWebRTCLogger(NSString *logString) {
jiayl2 2015/07/06 18:18:14 Add a severity level instead of all LS_INFO?
tkchin 2015/07/06 20:36:50 How useful is severity level in app context? I fee
jiayl2 2015/07/06 20:57:56 It'll make it easier to automatically analyze the
tkchin_webrtc 2015/07/07 23:30:10 The philosophy on iOS (at least that I've been fol
+ if (logString.length) {
+#ifndef DEBUG
+ // WebRTC logger doesn't log to console in non-Debug builds by default. Explicitly log to
+ // console in this case.
+ NSLog(@"%@", logString);
+#endif
+ LOG(LS_INFO) << [logString UTF8String];
}
- store_->RequestIdentity(observer);
- return true;
}
-} // namespace webrtc
+NSString *ARDFileName(const char *filePath) {
+ NSString *nsFilePath = [[NSString alloc] initWithBytesNoCopy:const_cast<char *>(filePath)
+ length:strlen(filePath)
+ encoding:NSUTF8StringEncoding
+ freeWhenDone:NO];
+ return nsFilePath.lastPathComponent;
+}

Powered by Google App Engine
This is Rietveld 408576698