13f4cbf05Sopenharmony_ci/* 23f4cbf05Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 33f4cbf05Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 43f4cbf05Sopenharmony_ci * you may not use this file except in compliance with the License. 53f4cbf05Sopenharmony_ci * You may obtain a copy of the License at 63f4cbf05Sopenharmony_ci * 73f4cbf05Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 83f4cbf05Sopenharmony_ci * 93f4cbf05Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 103f4cbf05Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 113f4cbf05Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 123f4cbf05Sopenharmony_ci * See the License for the specific language governing permissions and 133f4cbf05Sopenharmony_ci * limitations under the License. 143f4cbf05Sopenharmony_ci */ 153f4cbf05Sopenharmony_ci 163f4cbf05Sopenharmony_ci#ifndef FUZZ_LOG_H 173f4cbf05Sopenharmony_ci#define FUZZ_LOG_H 183f4cbf05Sopenharmony_ci 193f4cbf05Sopenharmony_ci#ifdef DEBUG_FUZZ 203f4cbf05Sopenharmony_ci#include "hilog_base/log_base.h" 213f4cbf05Sopenharmony_ciconstexpr LogType FUZZ_LOG_TYPE = LOG_CORE; 223f4cbf05Sopenharmony_ciconstexpr unsigned int FUZZ_LOG_DOMAIN = 0xD003D00; 233f4cbf05Sopenharmony_ciconstexpr const char *FUZZ_LOG_TAG = "fuzz_test"; 243f4cbf05Sopenharmony_ci#define FUZZ_LOGF(...) (void)HiLogBasePrint(FUZZ_LOG_TYPE, LOG_FATAL, FUZZ_LOG_DOMAIN, FUZZ_LOG_TAG, __VA_ARGS__) 253f4cbf05Sopenharmony_ci#define FUZZ_LOGE(...) (void)HiLogBasePrint(FUZZ_LOG_TYPE, LOG_ERROR, FUZZ_LOG_DOMAIN, FUZZ_LOG_TAG, __VA_ARGS__) 263f4cbf05Sopenharmony_ci#define FUZZ_LOGW(...) (void)HiLogBasePrint(FUZZ_LOG_TYPE, LOG_WARN, FUZZ_LOG_DOMAIN, FUZZ_LOG_TAG, __VA_ARGS__) 273f4cbf05Sopenharmony_ci#define FUZZ_LOGI(...) (void)HiLogBasePrint(FUZZ_LOG_TYPE, LOG_INFO, FUZZ_LOG_DOMAIN, FUZZ_LOG_TAG, __VA_ARGS__) 283f4cbf05Sopenharmony_ci#define FUZZ_LOGD(...) (void)HiLogBasePrint(FUZZ_LOG_TYPE, LOG_DEBUG, FUZZ_LOG_DOMAIN, FUZZ_LOG_TAG, __VA_ARGS__) 293f4cbf05Sopenharmony_ci#else 303f4cbf05Sopenharmony_ci#define PARCEL_LOGF(...) 313f4cbf05Sopenharmony_ci#define PARCEL_LOGE(...) 323f4cbf05Sopenharmony_ci#define PARCEL_LOGW(...) 333f4cbf05Sopenharmony_ci#define PARCEL_LOGI(...) 343f4cbf05Sopenharmony_ci#define PARCEL_LOGD(...) 353f4cbf05Sopenharmony_ci#endif // (defined DEBUG_FUZZ) 363f4cbf05Sopenharmony_ci 373f4cbf05Sopenharmony_ci#endif // FUZZ_LOG_H