added iOS source code
[wl-app.git] / iOS / Pods / GoogleUtilities / GoogleUtilities / Network / Private / GULNetworkLoggerProtocol.h
1 /*
2  * Copyright 2017 Google
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #import <Foundation/Foundation.h>
18
19 #import <GoogleUtilities/GULLoggerLevel.h>
20
21 #import "GULNetworkMessageCode.h"
22
23 /// The log levels used by GULNetworkLogger.
24 typedef NS_ENUM(NSInteger, GULNetworkLogLevel) {
25   kGULNetworkLogLevelError = GULLoggerLevelError,
26   kGULNetworkLogLevelWarning = GULLoggerLevelWarning,
27   kGULNetworkLogLevelInfo = GULLoggerLevelInfo,
28   kGULNetworkLogLevelDebug = GULLoggerLevelDebug,
29 };
30
31 @protocol GULNetworkLoggerDelegate <NSObject>
32
33 @required
34 /// Tells the delegate to log a message with an array of contexts and the log level.
35 - (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel
36                     messageCode:(GULNetworkMessageCode)messageCode
37                         message:(NSString *)message
38                        contexts:(NSArray *)contexts;
39
40 /// Tells the delegate to log a message with a context and the log level.
41 - (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel
42                     messageCode:(GULNetworkMessageCode)messageCode
43                         message:(NSString *)message
44                         context:(id)context;
45
46 /// Tells the delegate to log a message with the log level.
47 - (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel
48                     messageCode:(GULNetworkMessageCode)messageCode
49                         message:(NSString *)message;
50
51 @end