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 OHOS_IPC_SERVICES_DBINDER_DBINDRR_LOG_H 17 #define OHOS_IPC_SERVICES_DBINDER_DBINDRR_LOG_H 18 19 #include "hilog/log.h" 20 #include "log_tags.h" 21 22 static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, OHOS::LOG_ID_RPC, LOG_TAG }; 23 24 #define DBINDER_LOGF(LOG_LABEL, fmt, args...) \ 25 (void)OHOS::HiviewDFX::HiLog::Fatal(LOG_LABEL, "%{public}d: " fmt, __LINE__, ##args) 26 #define DBINDER_LOGE(LOG_LABEL, fmt, args...) \ 27 (void)OHOS::HiviewDFX::HiLog::Error(LOG_LABEL, "%{public}d: " fmt, __LINE__, ##args) 28 #define DBINDER_LOGW(LOG_LABEL, fmt, args...) \ 29 (void)OHOS::HiviewDFX::HiLog::Warn(LOG_LABEL, "%{public}d: " fmt, __LINE__, ##args) 30 #define DBINDER_LOGI(LOG_LABEL, fmt, args...) \ 31 (void)OHOS::HiviewDFX::HiLog::Info(LOG_LABEL, "%{public}d: " fmt, __LINE__, ##args) 32 #define DBINDER_LOGD(LOG_LABEL, fmt, args...) \ 33 (void)OHOS::HiviewDFX::HiLog::Debug(LOG_LABEL, "%{public}d: " fmt, __LINE__, ##args) 34 35 36 #endif // OHOS_IPC_SERVICES_DBINDER_DBINDRR_LOG_H