/* * Copyright (C) 2022 HiHope Open Source Organization . * * HDF is dual licensed: you can use it either under the terms of * the GPL, or the BSD license, at your option. * See the LICENSE file in the root of this repository for complete details. */ #ifndef AUDIO_DEVICE_LOG_H #define AUDIO_DEVICE_LOG_H #include "hdf_log.h" #ifdef __cplusplus #if __cplusplus extern "C" { #endif #endif /* __cplusplus */ // 1 is on; 0 is off #define AUDIO_DEVICE_DEBUG_ON 0 #define AUDIO_DEVICE_LOG_ERR(fmt, arg...) do { \ HDF_LOGE("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \ } while (0) #define AUDIO_DEVICE_LOG_WARNING(fmt, arg...) do { \ HDF_LOGW("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \ } while (0) #if (AUDIO_DEVICE_DEBUG_ON) #define AUDIO_DEVICE_LOG_INFO(fmt, arg...) do { \ HDF_LOGI("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \ } while (0) #define AUDIO_DEVICE_LOG_DEBUG(fmt, arg...) do { \ HDF_LOGD("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \ } while (0) #else #define AUDIO_DEVICE_LOG_INFO(fmt, arg...) do { \ } while (0) #define AUDIO_DEVICE_LOG_DEBUG(fmt, arg...) do { \ } while (0) #endif #ifdef __cplusplus #if __cplusplus } #endif #endif /* __cplusplus */ #endif /* AUDIO_DEVICE_LOG_H */