1 /*
2  * Copyright (c) 2022 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 #ifndef FRAMEWORKS_OPENGL_WRAPPER_WRAPPER_LOG_H
16 #define FRAMEWORKS_OPENGL_WRAPPER_WRAPPER_LOG_H
17 
18 #include <hilog/log.h>
19 namespace OHOS {
20 #if (defined(__aarch64__) || defined(__x86_64__))
21 #define WPUBI64  "%{public}ld"
22 #define WPUB_SIZE "%{public}lu"
23 #define WPUBU64  "%{public}lu"
24 #else
25 #define WPUBI64  "%{public}lld"
26 #define WPUB_SIZE "%{public}u"
27 #define WPUBU64  "%{public}llu"
28 #endif
29 
30 #undef LOG_DOMAIN
31 #define LOG_DOMAIN 0xD001400
32 
33 #undef LOG_TAG
34 #define LOG_TAG "OpenGLWrapper"
35 
36 #ifdef EGL_WRAPPER_DEBUG_ENABLE
37 #define WLOGD(fmt, ...) HILOG_DEBUG(LOG_CORE, fmt, ##__VA_ARGS__)
38 #else
39 #define WLOGD(fmt, ...)
40 #endif
41 
42 #define WLOGI(fmt, ...) HILOG_INFO(LOG_CORE, fmt, ##__VA_ARGS__)
43 #define WLOGW(fmt, ...) HILOG_WARN(LOG_CORE, fmt, ##__VA_ARGS__)
44 #define WLOGE(fmt, ...) HILOG_ERROR(LOG_CORE, fmt, ##__VA_ARGS__)
45 } // namespace OHOS
46 #endif // FRAMEWORKS_OPENGL_WRAPPER_WRAPPER_LOG_H
47