140f5d65dSopenharmony_ci/* 240f5d65dSopenharmony_ci * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 340f5d65dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 440f5d65dSopenharmony_ci * you may not use this file except in compliance with the License. 540f5d65dSopenharmony_ci * You may obtain a copy of the License at 640f5d65dSopenharmony_ci * 740f5d65dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 840f5d65dSopenharmony_ci * 940f5d65dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1040f5d65dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1140f5d65dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1240f5d65dSopenharmony_ci * See the License for the specific language governing permissions and 1340f5d65dSopenharmony_ci * limitations under the License. 1440f5d65dSopenharmony_ci */ 1540f5d65dSopenharmony_ci#ifndef FILEMANAGEMENT_APP_FILE_SERVICE_INTERFACES_INNERKITS_NATIVE_COMMON_LOG_H 1640f5d65dSopenharmony_ci#define FILEMANAGEMENT_APP_FILE_SERVICE_INTERFACES_INNERKITS_NATIVE_COMMON_LOG_H 1740f5d65dSopenharmony_ci 1840f5d65dSopenharmony_ci#include "hilog/log.h" 1940f5d65dSopenharmony_ci#undef LOG_DOMAIN 2040f5d65dSopenharmony_ci#define LOG_DOMAIN 0xD004313 2140f5d65dSopenharmony_ci#undef LOG_TAG 2240f5d65dSopenharmony_ci#define LOG_TAG "AppFileService" 2340f5d65dSopenharmony_cinamespace OHOS { 2440f5d65dSopenharmony_cinamespace AppFileService { 2540f5d65dSopenharmony_ci 2640f5d65dSopenharmony_ci#define LOGI(fmt, ...) ((void)HILOG_IMPL(LOG_CORE, LOG_INFO, LOG_DOMAIN, LOG_TAG, \ 2740f5d65dSopenharmony_ci "[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)) 2840f5d65dSopenharmony_ci#define LOGW(fmt, ...) ((void)HILOG_IMPL(LOG_CORE, LOG_WARN, LOG_DOMAIN, LOG_TAG, \ 2940f5d65dSopenharmony_ci "[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)) 3040f5d65dSopenharmony_ci#define LOGD(fmt, ...) ((void)HILOG_IMPL(LOG_CORE, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, \ 3140f5d65dSopenharmony_ci "[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)) 3240f5d65dSopenharmony_ci#define LOGE(fmt, ...) ((void)HILOG_IMPL(LOG_CORE, LOG_ERROR, LOG_DOMAIN, LOG_TAG, \ 3340f5d65dSopenharmony_ci "[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)) 3440f5d65dSopenharmony_ci#define LOGF(fmt, ...) ((void)HILOG_IMPL(LOG_CORE, LOG_FATAL, LOG_DOMAIN, LOG_TAG, \ 3540f5d65dSopenharmony_ci "[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)) 3640f5d65dSopenharmony_ci} // namespace AppFileService 3740f5d65dSopenharmony_ci} // namespace OHOS 3840f5d65dSopenharmony_ci 3940f5d65dSopenharmony_ci#endif // FILEMANAGEMENT_APP_FILE_SERVICE_INTERFACES_INNERKITS_NATIVE_COMMON_LOG_H