diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-05-06 10:17:00 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-05-06 10:17:00 +0100 |
commit | 10930fcbaf985bdc414e9a7951dc8a0e3e9d53f6 (patch) | |
tree | a5d1a2413643f1291b646ce2b7d22218ca06f497 /content/handlers/javascript/duktape/Console.bnd | |
parent | 6fdc692aa523a642770747042c82153933fa734c (diff) | |
download | netsurf-10930fcbaf985bdc414e9a7951dc8a0e3e9d53f6.tar.gz netsurf-10930fcbaf985bdc414e9a7951dc8a0e3e9d53f6.tar.bz2 |
Properly set log levels
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/handlers/javascript/duktape/Console.bnd')
-rw-r--r-- | content/handlers/javascript/duktape/Console.bnd | 16 |
1 files changed, 8 insertions, 8 deletions
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; %} |