Move log level to default port
Setting the log level should be specified by the actual port. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
@@ -156,14 +156,6 @@ typedef bool (*jerry_object_property_foreach_t) (const jerry_value_t property_na
|
||||
const jerry_value_t property_value,
|
||||
void *user_data_p);
|
||||
|
||||
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
#ifdef JERRY_ENABLE_LOG
|
||||
extern int jerry_debug_level;
|
||||
#endif /* JERRY_ENABLE_LOG */
|
||||
|
||||
/**
|
||||
* General engine functions
|
||||
*/
|
||||
|
||||
@@ -79,15 +79,6 @@ static const char *wrong_args_msg_p = "wrong type of argument";
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef JERRY_ENABLE_LOG
|
||||
|
||||
/**
|
||||
* Verbosity level of logging
|
||||
*/
|
||||
int jerry_debug_level = 0;
|
||||
|
||||
#endif /* JERRY_ENABLE_LOG */
|
||||
|
||||
/**
|
||||
* Assert that it is correct to call API in current state.
|
||||
*
|
||||
|
||||
+2
-14
@@ -83,19 +83,8 @@ extern void __noreturn jerry_unimplemented (const char *, const char *, const ch
|
||||
#define JERRY_UNUSED(x) ((void) (x))
|
||||
|
||||
#ifdef JERRY_ENABLE_LOG
|
||||
#define JERRY_LOG(lvl, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (lvl <= jerry_debug_level) \
|
||||
{ \
|
||||
jerry_port_log (JERRY_LOG_LEVEL_DEBUG, __VA_ARGS__); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define JERRY_DLOG(...) JERRY_LOG (1, __VA_ARGS__)
|
||||
#define JERRY_DDLOG(...) JERRY_LOG (2, __VA_ARGS__)
|
||||
#define JERRY_DDDLOG(...) JERRY_LOG (3, __VA_ARGS__)
|
||||
#define JERRY_DLOG(...) jerry_port_log (JERRY_LOG_LEVEL_DEBUG, __VA_ARGS__)
|
||||
#define JERRY_DDLOG(...) jerry_port_log (JERRY_LOG_LEVEL_TRACE, __VA_ARGS__)
|
||||
#else /* !JERRY_ENABLE_LOG */
|
||||
#define JERRY_DLOG(...) \
|
||||
do \
|
||||
@@ -106,7 +95,6 @@ extern void __noreturn jerry_unimplemented (const char *, const char *, const ch
|
||||
} \
|
||||
} while (0)
|
||||
#define JERRY_DDLOG(...) JERRY_DLOG (__VA_ARGS__)
|
||||
#define JERRY_DDDLOG(...) JERRY_DLOG (__VA_ARGS__)
|
||||
#endif /* JERRY_ENABLE_LOG */
|
||||
|
||||
#define JERRY_ERROR_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_ERROR, __VA_ARGS__)
|
||||
|
||||
Reference in New Issue
Block a user