1/*
2 * Copyright (C) 2022 HiHope Open Source Organization .
3 *
4 * HDF is dual licensed: you can use it either under the terms of
5 * the GPL, or the BSD license, at your option.
6 * See the LICENSE file in the root of this repository for complete details.
7 */
8
9#ifndef AUDIO_DEVICE_LOG_H
10#define AUDIO_DEVICE_LOG_H
11#include "hdf_log.h"
12
13#ifdef __cplusplus
14#if __cplusplus
15extern "C" {
16#endif
17#endif /* __cplusplus */
18// 1 is on; 0 is off
19#define AUDIO_DEVICE_DEBUG_ON 0
20
21#define AUDIO_DEVICE_LOG_ERR(fmt, arg...) do { \
22    HDF_LOGE("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \
23    } while (0)
24
25#define AUDIO_DEVICE_LOG_WARNING(fmt, arg...) do { \
26    HDF_LOGW("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \
27    } while (0)
28
29#if (AUDIO_DEVICE_DEBUG_ON)
30#define AUDIO_DEVICE_LOG_INFO(fmt, arg...) do { \
31    HDF_LOGI("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \
32    } while (0)
33
34#define AUDIO_DEVICE_LOG_DEBUG(fmt, arg...) do { \
35    HDF_LOGD("[%s][line:%d]: " fmt, __func__, __LINE__, ##arg); \
36    } while (0)
37#else
38#define AUDIO_DEVICE_LOG_INFO(fmt, arg...) do { \
39    } while (0)
40
41#define AUDIO_DEVICE_LOG_DEBUG(fmt, arg...) do { \
42    } while (0)
43#endif
44
45#ifdef __cplusplus
46#if __cplusplus
47}
48#endif
49#endif /* __cplusplus */
50
51#endif /* AUDIO_DEVICE_LOG_H */
52