GACAppCheckLogger+Internal.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2020 Google LLC
  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 "AppCheckCore/Sources/Public/AppCheckCore/GACAppCheckErrors.h"
  18. #import "AppCheckCore/Sources/Public/AppCheckCore/GACAppCheckLogger.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** Prints the given code and message to the console.
  21. *
  22. * @param code The message code describing the nature of the log.
  23. * @param logLevel The log level of this log.
  24. * @param message The message string to log.
  25. */
  26. FOUNDATION_EXPORT
  27. void GACAppCheckLog(GACAppCheckMessageCode code,
  28. GACAppCheckLogLevel logLevel,
  29. NSString *_Nonnull message);
  30. #define GACAppCheckLogFault(MESSAGE_CODE, MESSAGE) \
  31. GACAppCheckLog(MESSAGE_CODE, GACAppCheckLogLevelFault, MESSAGE);
  32. #define GACAppCheckLogError(MESSAGE_CODE, MESSAGE) \
  33. GACAppCheckLog(MESSAGE_CODE, GACAppCheckLogLevelError, MESSAGE);
  34. #define GACAppCheckLogWarning(MESSAGE_CODE, MESSAGE) \
  35. GACAppCheckLog(MESSAGE_CODE, GACAppCheckLogLevelWarning, MESSAGE);
  36. #define GACAppCheckLogInfo(MESSAGE_CODE, MESSAGE) \
  37. GACAppCheckLog(MESSAGE_CODE, GACAppCheckLogLevelInfo, MESSAGE);
  38. #define GACAppCheckLogDebug(MESSAGE_CODE, MESSAGE) \
  39. GACAppCheckLog(MESSAGE_CODE, GACAppCheckLogLevelDebug, MESSAGE);
  40. NS_ASSUME_NONNULL_END