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 LIBVULKAN_WRAPPER_LOG_H 16 #define LIBVULKAN_WRAPPER_LOG_H 17 18 #include <hilog/log.h> 19 namespace OHOS { 20 21 #ifdef EGL_WRAPPER_DEBUG_ENABLE 22 #define WLOGD(fmt, ...) OHOS::HiviewDFX::HiLog::Debug({ LOG_CORE, 0xD001402, "VulkanWrapper" }, \ 23 "<%{public}d>%{public}s: " fmt, __LINE__, __func__, ##__VA_ARGS__) 24 #else 25 #define WLOGD(fmt, ...) 26 #endif 27 28 #define WLOGI(fmt, ...) OHOS::HiviewDFX::HiLog::Info({ LOG_CORE, 0xD001402, "VulkanWrapper" }, \ 29 "<%{public}d>%{public}s: " fmt, __LINE__, __func__, ##__VA_ARGS__) 30 #define WLOGW(fmt, ...) OHOS::HiviewDFX::HiLog::Warn({ LOG_CORE, 0xD001402, "VulkanWrapper" }, \ 31 "<%{public}d>%{public}s: " fmt, __LINE__, __func__, ##__VA_ARGS__) 32 #define WLOGE(fmt, ...) OHOS::HiviewDFX::HiLog::Error({ LOG_CORE, 0xD001402, "VulkanWrapper" }, \ 33 "<%{public}d>%{public}s: " fmt, __LINE__, __func__, ##__VA_ARGS__) 34 } // namespace OHOS 35 #endif // LIBVULKAN_WRAPPER_LOG_H 36