• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ECMASCRIPT_LOG_WRAPPER_H
17 #define ECMASCRIPT_LOG_WRAPPER_H
18 
19 #include "ecmascript/log.h"
20 
21 // NO_TAG means not print any tag
22 #define LOG_NO_TAG(level) ARK_LOG(level, Component::NO_TAG)
23 #define LOG_ECMA(level) ARK_LOG(level, Component::ECMASCRIPT)
24 #define LOG_FULL(level) ARK_LOG(level, Component::ALL) << __func__ << ":" << __LINE__ << " "
25 #define LOG_GC(level) ARK_LOG(level, Component::GC)
26 #define LOG_INTERPRETER(level) ARK_LOG(level, Component::INTERPRETER)
27 #define LOG_COMPILER(level) ARK_LOG(level, Component::COMPILER)
28 #define LOG_DEBUGGER(level) ARK_LOG(level, Component::DEBUGGER)
29 #define LOG_BUILTINS(level) ARK_LOG(level, Component::BUILTINS)
30 #define LOG_TRACE(level) ARK_LOG(level, Component::TRACE)
31 #define LOG_ECMA_IF(cond, level) (cond) && ARK_LOG(level, Component::ALL)
32 // When the AOT compiler is integrated into the IDE, tag the output error messages for developers
33 #define LOG_HOST_TOOL_ERROR ARK_LOG(ERROR, Component::NO_TAG) << "[HostTool] "
34 
35 #endif  // ECMASCRIPT_LOG_WRAPPER_H
36