1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef FRAMEWORKS_BOOTANIMATION_INCLUDE_LOG_H
17#define FRAMEWORKS_BOOTANIMATION_INCLUDE_LOG_H
18
19#include <hilog/log.h>
20
21namespace OHOS {
22#if (defined(__aarch64__) || defined(__x86_64__))
23#define BPUBI64  "%{public}ld"
24#define BPUB_SIZE "%{public}lu"
25#define BPUBU64  "%{public}lu"
26#else
27#define BPUBI64  "%{public}lld"
28#define BPUB_SIZE "%{public}u"
29#define BPUBU64  "%{public}llu"
30#endif
31
32#undef LOG_DOMAIN
33#define LOG_DOMAIN 0xD001400
34
35#undef LOG_TAG
36#define LOG_TAG "BootAnimation"
37
38#define LOGI(format, ...) \
39    HILOG_INFO(LOG_CORE, format, ##__VA_ARGS__)
40#define LOGD(format, ...) \
41    HILOG_DEBUG(LOG_CORE, format, ##__VA_ARGS__)
42#define LOGE(format, ...) \
43    HILOG_ERROR(LOG_CORE, format, ##__VA_ARGS__)
44#define LOGW(format, ...) \
45    HILOG_WARN(LOG_CORE, format, ##__VA_ARGS__)
46#define LOGF(format, ...) \
47    HILOG_FATAL(LOG_CORE, format, ##__VA_ARGS__)
48} // namespace OHOS
49
50#endif // FRAMEWORKS_BOOTANIMATION_INCLUDE_LOG_H
51