1fc0b0055Sopenharmony_ci/* 2fc0b0055Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 3fc0b0055Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4fc0b0055Sopenharmony_ci * you may not use this file except in compliance with the License. 5fc0b0055Sopenharmony_ci * You may obtain a copy of the License at 6fc0b0055Sopenharmony_ci * 7fc0b0055Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8fc0b0055Sopenharmony_ci * 9fc0b0055Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10fc0b0055Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11fc0b0055Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12fc0b0055Sopenharmony_ci * See the License for the specific language governing permissions and 13fc0b0055Sopenharmony_ci * limitations under the License. 14fc0b0055Sopenharmony_ci */ 15fc0b0055Sopenharmony_ci 16fc0b0055Sopenharmony_ci#ifndef OHOS_ABILITY_ACCESS_CTRL_MACRO_H 17fc0b0055Sopenharmony_ci#define OHOS_ABILITY_ACCESS_CTRL_MACRO_H 18fc0b0055Sopenharmony_ci 19fc0b0055Sopenharmony_ci#include "hilog/log.h" 20fc0b0055Sopenharmony_ci 21fc0b0055Sopenharmony_ci#ifdef LOG_DOMAIN 22fc0b0055Sopenharmony_ci#undef LOG_DOMAIN 23fc0b0055Sopenharmony_ci#endif 24fc0b0055Sopenharmony_ci#ifdef LOG_TAG 25fc0b0055Sopenharmony_ci#undef LOG_TAG 26fc0b0055Sopenharmony_ci#endif 27fc0b0055Sopenharmony_ci 28fc0b0055Sopenharmony_ci#define LOG_DOMAIN 0xD002F01 29fc0b0055Sopenharmony_ci#define LOG_TAG "SECURITY_DOMAIN_ACCESSTOKEN" 30fc0b0055Sopenharmony_ci 31fc0b0055Sopenharmony_ci#define LOGI(...) \ 32fc0b0055Sopenharmony_ciif (HiLogIsLoggable(LOG_DOMAIN, LOG_TAG, LOG_INFO)) { \ 33fc0b0055Sopenharmony_ci HILOG_INFO(LOG_CORE, ##__VA_ARGS__); \ 34fc0b0055Sopenharmony_ci} 35fc0b0055Sopenharmony_ci 36fc0b0055Sopenharmony_ci#define LOGE(...) \ 37fc0b0055Sopenharmony_ciif (HiLogIsLoggable(LOG_DOMAIN, LOG_TAG, LOG_ERROR)) { \ 38fc0b0055Sopenharmony_ci HILOG_ERROR(LOG_CORE, __VA_ARGS__); \ 39fc0b0055Sopenharmony_ci} 40fc0b0055Sopenharmony_ci 41fc0b0055Sopenharmony_ci#endif // OHOS_ABILITY_ACCESS_CTRL_MACRO_H