1 /******************************************************************************
3 * Copyright (c) 2019 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
20 * @file This file defines all the functions used for logging.
23 #include "nr5g_fapi_std.h"
24 #include "nr5g_fapi_log.h"
26 nr5g_fapi_log_types_t nr5g_fapi_log_level_g;
28 //------------------------------------------------------------------------------
29 /** @ingroup group_lte_source_phy_api
31 * @param[in] FAPI log level
33 * @return String of log type
35 * @description The returns log level sring
38 //------------------------------------------------------------------------------
39 char *get_logger_type_str(
40 nr5g_fapi_log_types_t e)
56 return ("HEXDUMP_LOG");
59 printf("Log Error Type\n");
61 //case NONE: Should never be reached.
65 //------------------------------------------------------------------------------
66 /** @ingroup group_lte_source_phy_api
68 * @param[in] log level
72 * @description The function sets log level
75 //------------------------------------------------------------------------------
76 void nr5g_fapi_set_log_level(
77 nr5g_fapi_log_types_t new_level)
79 nr5g_fapi_log_level_g = new_level;
82 //------------------------------------------------------------------------------
83 /** @ingroup group_lte_source_phy_api
89 * @description The function returns log level.
92 //------------------------------------------------------------------------------
93 nr5g_fapi_log_types_t nr5g_fapi_get_log_level(
96 return nr5g_fapi_log_level_g;