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