14d6c458bSopenharmony_ci/*
24d6c458bSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
34d6c458bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
44d6c458bSopenharmony_ci * you may not use this file except in compliance with the License.
54d6c458bSopenharmony_ci * You may obtain a copy of the License at
64d6c458bSopenharmony_ci *
74d6c458bSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
84d6c458bSopenharmony_ci *
94d6c458bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
104d6c458bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
114d6c458bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124d6c458bSopenharmony_ci * See the License for the specific language governing permissions and
134d6c458bSopenharmony_ci * limitations under the License.
144d6c458bSopenharmony_ci */
154d6c458bSopenharmony_ci
164d6c458bSopenharmony_ci#ifndef JCONSOLE_LOG_H
174d6c458bSopenharmony_ci#define JCONSOLE_LOG_H
184d6c458bSopenharmony_ci
194d6c458bSopenharmony_ci#ifdef LINUX_PLATFORM
204d6c458bSopenharmony_ci#include <cstring>
214d6c458bSopenharmony_ci#include <cstdint>
224d6c458bSopenharmony_ci#endif
234d6c458bSopenharmony_ci#include <string>
244d6c458bSopenharmony_ci
254d6c458bSopenharmony_ci#include "utils/macros.h"
264d6c458bSopenharmony_ci#include "hilog/log.h"
274d6c458bSopenharmony_ci
284d6c458bSopenharmony_ci#undef LOG_DOMAIN
294d6c458bSopenharmony_ci#undef LOG_TAG
304d6c458bSopenharmony_ci#undef HILOG_FATAL
314d6c458bSopenharmony_ci#undef HILOG_ERROR
324d6c458bSopenharmony_ci#undef HILOG_WARN
334d6c458bSopenharmony_ci#undef HILOG_INFO
344d6c458bSopenharmony_ci#undef HILOG_DEBUG
354d6c458bSopenharmony_ci
364d6c458bSopenharmony_ci#define LOG_DOMAIN 0x3D00
374d6c458bSopenharmony_ci#define LOG_TAG "JSAPP"
384d6c458bSopenharmony_ci
394d6c458bSopenharmony_ci#define HILOG_FATAL(fmt, ...) ((void)HILOG_IMPL(LOG_APP, LOG_FATAL, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__))
404d6c458bSopenharmony_ci#define HILOG_ERROR(fmt, ...) ((void)HILOG_IMPL(LOG_APP, LOG_ERROR, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__))
414d6c458bSopenharmony_ci#define HILOG_WARN(fmt, ...) ((void)HILOG_IMPL(LOG_APP, LOG_WARN, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__))
424d6c458bSopenharmony_ci#define HILOG_INFO(fmt, ...) ((void)HILOG_IMPL(LOG_APP, LOG_INFO, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__))
434d6c458bSopenharmony_ci#define HILOG_DEBUG(fmt, ...) ((void)HILOG_IMPL(LOG_APP, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, fmt, ##__VA_ARGS__))
444d6c458bSopenharmony_ci
454d6c458bSopenharmony_ci#endif /* JCONSOLE_LOG_H */
46