FIRNetworkLoggerProtocol.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #import <Foundation/Foundation.h>
  17. #import "FIRLoggerLevel.h"
  18. #import "FIRNetworkMessageCode.h"
  19. /// The log levels used by FIRNetworkLogger.
  20. typedef NS_ENUM(NSInteger, FIRNetworkLogLevel) {
  21. kFIRNetworkLogLevelError = FIRLoggerLevelError,
  22. kFIRNetworkLogLevelWarning = FIRLoggerLevelWarning,
  23. kFIRNetworkLogLevelInfo = FIRLoggerLevelInfo,
  24. kFIRNetworkLogLevelDebug = FIRLoggerLevelDebug,
  25. };
  26. @protocol FIRNetworkLoggerDelegate <NSObject>
  27. @required
  28. /// Tells the delegate to log a message with an array of contexts and the log level.
  29. - (void)firNetwork_logWithLevel:(FIRNetworkLogLevel)logLevel
  30. messageCode:(FIRNetworkMessageCode)messageCode
  31. message:(NSString *)message
  32. contexts:(NSArray *)contexts;
  33. /// Tells the delegate to log a message with a context and the log level.
  34. - (void)firNetwork_logWithLevel:(FIRNetworkLogLevel)logLevel
  35. messageCode:(FIRNetworkMessageCode)messageCode
  36. message:(NSString *)message
  37. context:(id)context;
  38. /// Tells the delegate to log a message with the log level.
  39. - (void)firNetwork_logWithLevel:(FIRNetworkLogLevel)logLevel
  40. messageCode:(FIRNetworkMessageCode)messageCode
  41. message:(NSString *)message;
  42. @end