From 10930fcbaf985bdc414e9a7951dc8a0e3e9d53f6 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Mon, 6 May 2019 10:17:00 +0100 Subject: Properly set log levels Signed-off-by: Daniel Silverstone --- content/handlers/javascript/duktape/Console.bnd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'content') diff --git a/content/handlers/javascript/duktape/Console.bnd b/content/handlers/javascript/duktape/Console.bnd index acaab1610..cf4bc4f92 100644 --- a/content/handlers/javascript/duktape/Console.bnd +++ b/content/handlers/javascript/duktape/Console.bnd @@ -89,37 +89,37 @@ method Console::groupEnd () method Console::info() %{ - write_log_entry(ctx, priv->group, 'I'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_INFO); return 0; %} method Console::debug() %{ - write_log_entry(ctx, priv->group, 'D'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_DEBUG); return 0; %} method Console::error() %{ - write_log_entry(ctx, priv->group, 'E'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_ERROR); return 0; %} method Console::log() %{ - write_log_entry(ctx, priv->group, 'L'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_LOG); return 0; %} method Console::warn() %{ - write_log_entry(ctx, priv->group, 'W'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_WARN); return 0; %} method Console::dir() %{ - write_log_entry(ctx, priv->group, 'd'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_INFO); return 0; %} @@ -182,7 +182,7 @@ method Console::timeEnd() duk_push_string(ctx, "Timer elapsed: "); duk_insert(ctx, 0); duk_push_sprintf(ctx, "%lu ms", (duk_uint_t)(time_ms - old_time_ms)); - write_log_entry(ctx, priv->group, 'T'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_INFO); return 0; %} @@ -193,6 +193,6 @@ method Console::trace () duk_safe_to_string(ctx, -1); duk_insert(ctx, 0); duk_set_top(ctx, 1); - write_log_entry(ctx, priv->group, 'S'); + write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_INFO); return 0; %} -- cgit v1.2.3