|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -#import "GULLogger.h" |
18 |
| - |
19 | 17 | #import "GDTAssert.h"
|
20 | 18 |
|
21 |
| -/** The console logger prefix. */ |
22 |
| -static GULLoggerService kGDTConsoleLogger = @"[GoogleDataTransport]"; |
23 |
| - |
24 | 19 | /** A list of message codes to print in the logger that help to correspond printed messages with
|
25 | 20 | * code locations.
|
26 | 21 | *
|
@@ -50,23 +45,21 @@ typedef NS_ENUM(NSInteger, GDTMessageCode) {
|
50 | 45 | };
|
51 | 46 |
|
52 | 47 | /** */
|
53 |
| -FOUNDATION_EXPORT NSString *_Nonnull GDTMessageCodeEnumToString(GDTMessageCode code); |
| 48 | +FOUNDATION_EXPORT |
| 49 | +void GDTLog(GDTMessageCode code, NSString *format, ...); |
54 | 50 |
|
55 |
| -/** Logs the warningMessage string to the console at the warning level. |
| 51 | +/** Returns the string that represents some message code. |
56 | 52 | *
|
57 |
| - * @param warningMessageFormat The format string to log to the console. |
| 53 | + * @param code The code to convert to a string. |
| 54 | + * @return The string representing the message code. |
58 | 55 | */
|
59 |
| -FOUNDATION_EXPORT void GDTLogWarning(GDTMessageCode messageCode, |
60 |
| - NSString *_Nonnull warningMessageFormat, |
61 |
| - ...) NS_FORMAT_FUNCTION(2, 3); |
| 56 | +FOUNDATION_EXPORT NSString *_Nonnull GDTMessageCodeEnumToString(GDTMessageCode code); |
62 | 57 |
|
63 | 58 | // A define to wrap GULLogWarning with slightly more convenient usage.
|
64 |
| -#define GDTLogWarning(MESSAGE_CODE, MESSAGE_FORMAT, ...) \ |
65 |
| - GULLogWarning(kGDTConsoleLogger, YES, GDTMessageCodeEnumToString(MESSAGE_CODE), MESSAGE_FORMAT, \ |
66 |
| - __VA_ARGS__); |
| 59 | +#define GDTLogWarning(MESSAGE_CODE, MESSAGE_FORMAT, ...) \ |
| 60 | + GDTLog(MESSAGE_CODE, MESSAGE_FORMAT, __VA_ARGS__); |
67 | 61 |
|
68 | 62 | // A define to wrap GULLogError with slightly more convenient usage and a failing assert.
|
69 |
| -#define GDTLogError(MESSAGE_CODE, MESSAGE_FORMAT, ...) \ |
70 |
| - GULLogError(kGDTConsoleLogger, YES, GDTMessageCodeEnumToString(MESSAGE_CODE), MESSAGE_FORMAT, \ |
71 |
| - __VA_ARGS__); \ |
| 63 | +#define GDTLogError(MESSAGE_CODE, MESSAGE_FORMAT, ...) \ |
| 64 | + GDTLog(MESSAGE_CODE, MESSAGE_FORMAT, __VA_ARGS__); \ |
72 | 65 | GDTAssert(NO, MESSAGE_FORMAT, __VA_ARGS__);
|
0 commit comments