Files
wengchangcheng 439ff56091 delete some unused log
1. add VERBOSE level log, default not print
2. modify some DEBUGE level log to VERBOSE

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5GBKW

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I1fba38346d55fb633c7a0ec018848653137d4009
2022-07-09 18:43:58 +08:00

46 lines
1.5 KiB
C

/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ECMASCRIPT_LOG_WRAPPER_H
#define ECMASCRIPT_LOG_WRAPPER_H
#ifdef ENABLE_HILOG
#include "ecmascript/log.h"
#define LOG_ECMA(level) HILOG_ECMA(level)
#else // ENABLE_HILOG
#include "libpandabase/utils/logger.h"
// HILOG use WARN, but panda use WARNING
#define _LOG_WARN(component, p) _LOG_WARNING(component, p)
// print Verbose log as Debug in host
#define _LOG_VERBOSE(component, p) _LOG_DEBUG(component, p)
#define LOG_ECMA(level) LOG(level, ECMASCRIPT)
#endif // ENABLE_HILOG
#define LOG_FULL(level) LOG_ECMA(level) << __func__ << ":" << __LINE__ << " "
#define LOG_GC(level) LOG_ECMA(level) << " gc: "
#define LOG_INTERPRETER(level) LOG_ECMA(level) << " interpreter: "
#define LOG_COMPILER(level) LOG_ECMA(level) << " compiler: "
#define LOG_DEBUGGER(level) LOG_ECMA(level) << " debugger: "
#define LOG_ECMA_IF(cond, level) (cond) && LOG_ECMA(level)
#endif // ECMASCRIPT_LOG_WRAPPER_H