1e656c62eSopenharmony_ci/*
2e656c62eSopenharmony_ci * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3e656c62eSopenharmony_ci * Licensed under the Mulan PSL v2.
4e656c62eSopenharmony_ci * You can use this software according to the terms and conditions of the Mulan PSL v2.
5e656c62eSopenharmony_ci * You may obtain a copy of Mulan PSL v2 at:
6e656c62eSopenharmony_ci *     http://license.coscl.org.cn/MulanPSL2
7e656c62eSopenharmony_ci * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
8e656c62eSopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
9e656c62eSopenharmony_ci * PURPOSE.
10e656c62eSopenharmony_ci * See the Mulan PSL v2 for more details.
11e656c62eSopenharmony_ci */
12e656c62eSopenharmony_ci
13e656c62eSopenharmony_ci#ifndef TEE_LOG_H
14e656c62eSopenharmony_ci#define TEE_LOG_H
15e656c62eSopenharmony_ci
16e656c62eSopenharmony_ci#ifndef CONFIG_ARMPC_PLATFORM
17e656c62eSopenharmony_ci#include "hilog/log_c.h"
18e656c62eSopenharmony_ci#endif
19e656c62eSopenharmony_ci
20e656c62eSopenharmony_ci#ifdef __cplusplus
21e656c62eSopenharmony_ciextern "C" {
22e656c62eSopenharmony_ci#endif
23e656c62eSopenharmony_ci
24e656c62eSopenharmony_ci#ifdef LOG_TAG
25e656c62eSopenharmony_ci#undef LOG_TAG
26e656c62eSopenharmony_ci#endif
27e656c62eSopenharmony_ci#define LOG_TAG "tee_client"
28e656c62eSopenharmony_ci
29e656c62eSopenharmony_ci#ifdef LOG_DOMAIN
30e656c62eSopenharmony_ci#undef LOG_DOMAIN
31e656c62eSopenharmony_ci#endif
32e656c62eSopenharmony_ci#define LOG_DOMAIN 0xD002F00
33e656c62eSopenharmony_ci
34e656c62eSopenharmony_ci#ifndef CONFIG_ARMPC_PLATFORM
35e656c62eSopenharmony_ci#define tlogv(...) HILOG_DEBUG(LOG_CORE, __VA_ARGS__)
36e656c62eSopenharmony_ci
37e656c62eSopenharmony_ci#define tlogd(...) HILOG_DEBUG(LOG_CORE, __VA_ARGS__)
38e656c62eSopenharmony_ci
39e656c62eSopenharmony_ci#define tlogi(...) HILOG_INFO(LOG_CORE, __VA_ARGS__)
40e656c62eSopenharmony_ci
41e656c62eSopenharmony_ci#define tlogw(...) HILOG_WARN(LOG_CORE, __VA_ARGS__)
42e656c62eSopenharmony_ci
43e656c62eSopenharmony_ci#define tloge(...) HILOG_ERROR(LOG_CORE, __VA_ARGS__)
44e656c62eSopenharmony_ci#else
45e656c62eSopenharmony_ci#define tlogv(...) printf(__VA_ARGS__)
46e656c62eSopenharmony_ci
47e656c62eSopenharmony_ci#define tlogd(...) printf(__VA_ARGS__)
48e656c62eSopenharmony_ci
49e656c62eSopenharmony_ci#define tlogi(...) printf(__VA_ARGS__)
50e656c62eSopenharmony_ci
51e656c62eSopenharmony_ci#define tlogw(...) printf(__VA_ARGS__)
52e656c62eSopenharmony_ci
53e656c62eSopenharmony_ci#define tloge(...) printf(__VA_ARGS__)
54e656c62eSopenharmony_ci#endif
55e656c62eSopenharmony_ci
56e656c62eSopenharmony_ci#ifdef __cplusplus
57e656c62eSopenharmony_ci}
58e656c62eSopenharmony_ci#endif
59e656c62eSopenharmony_ci
60e656c62eSopenharmony_ci#endif
61