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 SERVICES_SAMGR_NATIVE_INCLUDE_SAM_LOG_H_ 17 #define SERVICES_SAMGR_NATIVE_INCLUDE_SAM_LOG_H_ 18 19 #include "hilog/log.h" 20 21 namespace OHOS { 22 static constexpr OHOS::HiviewDFX::HiLogLabel SYSTEM_ABLILITY_MGR_LABEL = { 23 LOG_CORE, 24 0xD001800, 25 "SAMGR" 26 }; 27 28 #ifdef HILOGF 29 #undef HILOGF 30 #endif 31 32 #ifdef HILOGE 33 #undef HILOGE 34 #endif 35 36 #ifdef HILOGW 37 #undef HILOGW 38 #endif 39 40 #ifdef HILOGI 41 #undef HILOGI 42 #endif 43 44 #ifdef HILOGD 45 #undef HILOGD 46 #endif 47 48 #define HILOGF(...) (void)OHOS::HiviewDFX::HiLog::Fatal(SYSTEM_ABLILITY_MGR_LABEL, __VA_ARGS__) 49 #define HILOGE(...) (void)OHOS::HiviewDFX::HiLog::Error(SYSTEM_ABLILITY_MGR_LABEL, __VA_ARGS__) 50 #define HILOGW(...) (void)OHOS::HiviewDFX::HiLog::Warn(SYSTEM_ABLILITY_MGR_LABEL, __VA_ARGS__) 51 #define HILOGI(...) (void)OHOS::HiviewDFX::HiLog::Info(SYSTEM_ABLILITY_MGR_LABEL, __VA_ARGS__) 52 #define HILOGD(...) (void)OHOS::HiviewDFX::HiLog::Debug(SYSTEM_ABLILITY_MGR_LABEL, __VA_ARGS__) 53 } // namespace OHOS 54 55 #endif // #ifndef SERVICES_SAMGR_NATIVE_INCLUDE_SAM_LOG_H_ 56