1190978c3Sopenharmony_ci/*
2190978c3Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
3190978c3Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4190978c3Sopenharmony_ci * you may not use this file except in compliance with the License.
5190978c3Sopenharmony_ci * You may obtain a copy of the License at
6190978c3Sopenharmony_ci *
7190978c3Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8190978c3Sopenharmony_ci *
9190978c3Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10190978c3Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11190978c3Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12190978c3Sopenharmony_ci * See the License for the specific language governing permissions and
13190978c3Sopenharmony_ci * limitations under the License.
14190978c3Sopenharmony_ci */
15190978c3Sopenharmony_ci
16190978c3Sopenharmony_ci#ifndef FIRMWARE_LOG_H
17190978c3Sopenharmony_ci#define FIRMWARE_LOG_H
18190978c3Sopenharmony_ci
19190978c3Sopenharmony_ci#include "update_log.h"
20190978c3Sopenharmony_ci
21190978c3Sopenharmony_cinamespace OHOS {
22190978c3Sopenharmony_cinamespace UpdateEngine {
23190978c3Sopenharmony_cistatic constexpr OHOS::HiviewDFX::HiLogLabel FIRMWARE_UPDATE_LABEL = {LOG_CORE, 0xD002E00, "UPDATE_FIRMWARE"};
24190978c3Sopenharmony_ci
25190978c3Sopenharmony_ci#define FIRMWARE_LOGD(fmt, ...) PRINT_LOGD(UPDATE_FIRMWARE_TAG, fmt, ##__VA_ARGS__)
26190978c3Sopenharmony_ci#define FIRMWARE_LOGI(fmt, ...) PRINT_LOGI(UPDATE_FIRMWARE_TAG, fmt, ##__VA_ARGS__)
27190978c3Sopenharmony_ci#define FIRMWARE_LOGE(fmt, ...) PRINT_LOGE(UPDATE_FIRMWARE_TAG, fmt, ##__VA_ARGS__)
28190978c3Sopenharmony_ci
29190978c3Sopenharmony_ci#define FIRMWARE_LONG_LOGD(fmt, args) PRINT_LONG_LOGD(UPDATE_FIRMWARE_TAG, UPDATE_LABEL[UPDATE_FIRMWARE_TAG], \
30190978c3Sopenharmony_ci    fmt, args)
31190978c3Sopenharmony_ci#define FIRMWARE_LONG_LOGI(fmt, args) PRINT_LONG_LOGI(UPDATE_FIRMWARE_TAG, UPDATE_LABEL[UPDATE_FIRMWARE_TAG], \
32190978c3Sopenharmony_ci    fmt, args)
33190978c3Sopenharmony_ci#define FIRMWARE_LONG_LOGE(fmt, args) PRINT_LONG_LOGE(UPDATE_FIRMWARE_TAG, UPDATE_LABEL[UPDATE_FIRMWARE_TAG], \
34190978c3Sopenharmony_ci    fmt, args)
35190978c3Sopenharmony_ci} // namespace UpdateEngine
36190978c3Sopenharmony_ci} // namespace OHOS
37190978c3Sopenharmony_ci#endif // FIRMWARE_LOG_H