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

Side by Side Diff: webrtc/base/objc/RTCLogging.h

Issue 1845133002: Minor ObjC header updates. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/objc/RTCFileLogger.mm ('k') | webrtc/base/objc/RTCLogging.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #import <Foundation/Foundation.h> 11 #import <Foundation/Foundation.h>
12 12
13 // Subset of rtc::LoggingSeverity. 13 // Subset of rtc::LoggingSeverity.
14 typedef NS_ENUM(NSInteger, RTCLoggingSeverity) { 14 typedef NS_ENUM(NSInteger, RTCLoggingSeverity) {
15 kRTCLoggingSeverityVerbose, 15 RTCLoggingSeverityVerbose,
16 kRTCLoggingSeverityInfo, 16 RTCLoggingSeverityInfo,
17 kRTCLoggingSeverityWarning, 17 RTCLoggingSeverityWarning,
18 kRTCLoggingSeverityError, 18 RTCLoggingSeverityError,
19 }; 19 };
20 20
21 #if defined(__cplusplus) 21 #if defined(__cplusplus)
22 extern "C" void RTCLogEx(RTCLoggingSeverity severity, NSString* log_string); 22 extern "C" void RTCLogEx(RTCLoggingSeverity severity, NSString* log_string);
23 extern "C" void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity); 23 extern "C" void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity);
24 extern "C" NSString* RTCFileName(const char* filePath); 24 extern "C" NSString* RTCFileName(const char* filePath);
25 #else 25 #else
26 26
27 // Wrapper for C++ LOG(sev) macros. 27 // Wrapper for C++ LOG(sev) macros.
28 // Logs the log string to the webrtc logstream for the given severity. 28 // Logs the log string to the webrtc logstream for the given severity.
(...skipping 17 matching lines...) Expand all
46 __FUNCTION__, \ 46 __FUNCTION__, \
47 ##__VA_ARGS__] 47 ##__VA_ARGS__]
48 48
49 #define RTCLogFormat(severity, format, ...) \ 49 #define RTCLogFormat(severity, format, ...) \
50 do { \ 50 do { \
51 NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \ 51 NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \
52 RTCLogEx(severity, log_string); \ 52 RTCLogEx(severity, log_string); \
53 } while (false) 53 } while (false)
54 54
55 #define RTCLogVerbose(format, ...) \ 55 #define RTCLogVerbose(format, ...) \
56 RTCLogFormat(kRTCLoggingSeverityVerbose, format, ##__VA_ARGS__) \ 56 RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) \
57 57
58 #define RTCLogInfo(format, ...) \ 58 #define RTCLogInfo(format, ...) \
59 RTCLogFormat(kRTCLoggingSeverityInfo, format, ##__VA_ARGS__) \ 59 RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) \
60 60
61 #define RTCLogWarning(format, ...) \ 61 #define RTCLogWarning(format, ...) \
62 RTCLogFormat(kRTCLoggingSeverityWarning, format, ##__VA_ARGS__) \ 62 RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) \
63 63
64 #define RTCLogError(format, ...) \ 64 #define RTCLogError(format, ...) \
65 RTCLogFormat(kRTCLoggingSeverityError, format, ##__VA_ARGS__) \ 65 RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) \
66 66
67 #if !defined(NDEBUG) 67 #if !defined(NDEBUG)
68 #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) 68 #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
69 #else 69 #else
70 #define RTCLogDebug(format, ...) \ 70 #define RTCLogDebug(format, ...) \
71 do { \ 71 do { \
72 } while (false) 72 } while (false)
73 #endif 73 #endif
74 74
75 #define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__) 75 #define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
OLDNEW
« no previous file with comments | « webrtc/base/objc/RTCFileLogger.mm ('k') | webrtc/base/objc/RTCLogging.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698