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 16 #ifndef RME_LOG_DOMAIN_H 17 #define RME_LOG_DOMAIN_H 18 19 #include <cstdint> 20 #include "hilog/log.h" 21 22 namespace OHOS { 23 namespace RmeLogDomain { 24 constexpr uint32_t RME_INTELLISENSE = 0xD001706; 25 26 /* 27 #ifdef RME_LOGF 28 #undef RME_LOGF 29 #endif 30 31 #ifdef RME_LOGE 32 #undef RME_LOGE 33 #endif 34 35 #ifdef RME_LOGW 36 #undef RME_LOGW 37 #endif 38 39 #ifdef RME_LOGI 40 #undef RME_LOGI 41 #endif 42 43 #ifdef RME_LOGD 44 #undef RME_LOGD 45 #endif 46 */ 47 48 #define DEFINE_RMELOG_INTELLISENSE(name) \ 49 static constexpr OHOS::HiviewDFX::HiLogLabel RME_LOG_LABEL = {LOG_CORE, OHOS::RmeLogDomain::RME_INTELLISENSE, name} 50 51 #define RME_LOGF(...) (void)OHOS::HiviewDFX::HiLog::Fatal(RME_LOG_LABEL, ##__VA_ARGS__) 52 #define RME_LOGE(...) (void)OHOS::HiviewDFX::HiLog::Error(RME_LOG_LABEL, ##__VA_ARGS__) 53 #define RME_LOGW(...) (void)OHOS::HiviewDFX::HiLog::Warn(RME_LOG_LABEL, ##__VA_ARGS__) 54 #define RME_LOGI(...) (void)OHOS::HiviewDFX::HiLog::Info(RME_LOG_LABEL, ##__VA_ARGS__) 55 #define RME_LOGD(...) (void)OHOS::HiviewDFX::HiLog::Debug(RME_LOG_LABEL, ##__VA_ARGS__) 56 } // namespace RmeLogDomain 57 } // namespace OHOS 58 #endif // RME_LOG_DOMAIN_H 59