1f0bfeaa8Sopenharmony_ci/* 2f0bfeaa8Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 3f0bfeaa8Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4f0bfeaa8Sopenharmony_ci * you may not use this file except in compliance with the License. 5f0bfeaa8Sopenharmony_ci * You may obtain a copy of the License at 6f0bfeaa8Sopenharmony_ci * 7f0bfeaa8Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8f0bfeaa8Sopenharmony_ci * 9f0bfeaa8Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10f0bfeaa8Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11f0bfeaa8Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12f0bfeaa8Sopenharmony_ci * See the License for the specific language governing permissions and 13f0bfeaa8Sopenharmony_ci * limitations under the License. 14f0bfeaa8Sopenharmony_ci */ 15f0bfeaa8Sopenharmony_ci 16f0bfeaa8Sopenharmony_ci#ifndef OHOS_UTILS_MEMORY_LIBPURGEABLEMEM_CPP_INCLUDE_PM_LOG_C_H 17f0bfeaa8Sopenharmony_ci#define OHOS_UTILS_MEMORY_LIBPURGEABLEMEM_CPP_INCLUDE_PM_LOG_C_H 18f0bfeaa8Sopenharmony_ci 19f0bfeaa8Sopenharmony_ci#include "hilog/log.h" 20f0bfeaa8Sopenharmony_ci 21f0bfeaa8Sopenharmony_ci#undef LOG_DOMAIN 22f0bfeaa8Sopenharmony_ci#undef LOG_TAG 23f0bfeaa8Sopenharmony_ci#define LOG_DOMAIN 0xD001799 24f0bfeaa8Sopenharmony_ci 25f0bfeaa8Sopenharmony_ci#ifdef PM_HILOG_ERROR_C 26f0bfeaa8Sopenharmony_ci#undef PM_HILOG_ERROR_C 27f0bfeaa8Sopenharmony_ci#endif 28f0bfeaa8Sopenharmony_ci 29f0bfeaa8Sopenharmony_ci#ifdef PM_HILOG_INFO_C 30f0bfeaa8Sopenharmony_ci#undef PM_HILOG_INFO_C 31f0bfeaa8Sopenharmony_ci#endif 32f0bfeaa8Sopenharmony_ci 33f0bfeaa8Sopenharmony_ci#ifdef PM_HILOG_DEBUG_C 34f0bfeaa8Sopenharmony_ci#undef PM_HILOG_DEBUG_C 35f0bfeaa8Sopenharmony_ci#endif 36f0bfeaa8Sopenharmony_ci 37f0bfeaa8Sopenharmony_ci#define PM_FILENAME "purgeable" 38f0bfeaa8Sopenharmony_ci 39f0bfeaa8Sopenharmony_ci#define PM_HILOG_ERROR_C(logCore, fmt, ...) \ 40f0bfeaa8Sopenharmony_ci (void)HILOG_ERROR( \ 41f0bfeaa8Sopenharmony_ci LOG_CORE, "[%{public}s(%{public}s:%{public}d)]" fmt, PM_FILENAME, __FUNCTION__, __LINE__, ##__VA_ARGS__) 42f0bfeaa8Sopenharmony_ci 43f0bfeaa8Sopenharmony_ci#define PM_HILOG_INFO_C(logCore, fmt, ...) \ 44f0bfeaa8Sopenharmony_ci (void)HILOG_INFO( \ 45f0bfeaa8Sopenharmony_ci LOG_CORE, "[%{public}s(%{public}s:%{public}d)]" fmt, PM_FILENAME, __FUNCTION__, __LINE__, ##__VA_ARGS__) 46f0bfeaa8Sopenharmony_ci 47f0bfeaa8Sopenharmony_ci#define PM_HILOG_DEBUG_C(logCore, fmt, ...) \ 48f0bfeaa8Sopenharmony_ci (void)HILOG_DEBUG( \ 49f0bfeaa8Sopenharmony_ci LOG_CORE, "[%{public}s(%{public}s:%{public}d)]" fmt, PM_FILENAME, __FUNCTION__, __LINE__, ##__VA_ARGS__) 50f0bfeaa8Sopenharmony_ci#endif