2 This file defines the Redfish debug library interface.
4 Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef REDFISH_DEBUG_LIB_H_
11 #define REDFISH_DEBUG_LIB_H_
14 #include <Library/JsonLib.h>
15 #include <Library/RedfishLib.h>
17 #define DEBUG_REDFISH_NETWORK DEBUG_INFO ///< Debug error level for Redfish networking function
21 This function dump the Json string in given error level.
23 @param[in] ErrorLevel DEBUG macro error level
24 @param[in] JsonValue Json value to dump.
26 @retval EFI_SUCCESS Json string is printed.
27 @retval Others Errors occur.
33 IN EDKII_JSON_VALUE JsonValue
38 This function dump the status code, header and body in given
41 @param[in] ErrorLevel DEBUG macro error level
42 @param[in] Payload Redfish payload to dump
44 @retval EFI_SUCCESS Redfish payload is printed.
45 @retval Others Errors occur.
51 IN REDFISH_PAYLOAD Payload
56 This function dump the status code, header and body in given
59 @param[in] Message Message string
60 @param[in] ErrorLevel DEBUG macro error level
61 @param[in] Response Redfish response to dump
63 @retval EFI_SUCCESS Redfish response is printed.
64 @retval Others Errors occur.
69 IN CONST CHAR8
*Message
,
71 IN REDFISH_RESPONSE
*Response
76 This function dump the HTTP status code.
78 @param[in] ErrorLevel DEBUG macro error level
79 @param[in] HttpStatusCode HTTP status code
81 @retval EFI_SUCCESS HTTP status code is printed
87 IN EFI_HTTP_STATUS_CODE HttpStatusCode