mirror of https://github.com/arendst/Tasmota.git
Merge pull request #14372 from s-hadinger/reduce_logging
Reduce logging for Berry
This commit is contained in:
commit
559e818d3c
|
@ -16,6 +16,7 @@ extern const bcstring be_const_str_BRY_X3A_X20could_X20not_X20save_X20compiled_X
|
||||||
extern const bcstring be_const_str_BRY_X3A_X20failed_X20to_X20load_X20_persist_X2Ejson;
|
extern const bcstring be_const_str_BRY_X3A_X20failed_X20to_X20load_X20_persist_X2Ejson;
|
||||||
extern const bcstring be_const_str_BUTTON_CONFIGURATION;
|
extern const bcstring be_const_str_BUTTON_CONFIGURATION;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s;
|
extern const bcstring be_const_str_CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s;
|
||||||
|
extern const bcstring be_const_str_CFG_X3A_X20No_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20_X27init_X2Ebat_X27_X20done_X2C_X20restarting;
|
extern const bcstring be_const_str_CFG_X3A_X20_X27init_X2Ebat_X27_X20done_X2C_X20restarting;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20could_X20not_X20run_X20_X25s_X20_X28_X25s_X20_X2D_X20_X25s_X29;
|
extern const bcstring be_const_str_CFG_X3A_X20could_X20not_X20run_X20_X25s_X20_X28_X25s_X20_X2D_X20_X25s_X29;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20downloading_X20_X27_X25s_X27;
|
extern const bcstring be_const_str_CFG_X3A_X20downloading_X20_X27_X25s_X27;
|
||||||
|
@ -25,7 +26,6 @@ extern const bcstring be_const_str_CFG_X3A_X20loaded_X20_X27_X25s_X27;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20loading_X20;
|
extern const bcstring be_const_str_CFG_X3A_X20loading_X20;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20loading_X20_X27_X25s_X27;
|
extern const bcstring be_const_str_CFG_X3A_X20loading_X20_X27_X25s_X27;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29;
|
extern const bcstring be_const_str_CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found;
|
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20ran_X20_X20;
|
extern const bcstring be_const_str_CFG_X3A_X20ran_X20_X20;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20removed_X20file_X20_X27_X25s_X27;
|
extern const bcstring be_const_str_CFG_X3A_X20removed_X20file_X20_X27_X25s_X27;
|
||||||
extern const bcstring be_const_str_CFG_X3A_X20removing_X20autoconf_X20files;
|
extern const bcstring be_const_str_CFG_X3A_X20removing_X20autoconf_X20files;
|
||||||
|
|
|
@ -81,6 +81,7 @@ be_define_const_str(BRY_X3A_X20failed_X20to_X20load_X20_persist_X2Ejson, "BRY: f
|
||||||
be_define_const_str(BUTTON_CONFIGURATION, "BUTTON_CONFIGURATION", 70820856u, 0, 20, &be_const_str_SERIAL_7E1);
|
be_define_const_str(BUTTON_CONFIGURATION, "BUTTON_CONFIGURATION", 70820856u, 0, 20, &be_const_str_SERIAL_7E1);
|
||||||
be_define_const_str(CFG_X3A_X20_X27init_X2Ebat_X27_X20done_X2C_X20restarting, "CFG: 'init.bat' done, restarting", 1569670677u, 0, 32, NULL);
|
be_define_const_str(CFG_X3A_X20_X27init_X2Ebat_X27_X20done_X2C_X20restarting, "CFG: 'init.bat' done, restarting", 1569670677u, 0, 32, NULL);
|
||||||
be_define_const_str(CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s, "CFG: Exception> '%s' - %s", 1228874553u, 0, 25, &be_const_str_byte);
|
be_define_const_str(CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s, "CFG: Exception> '%s' - %s", 1228874553u, 0, 25, &be_const_str_byte);
|
||||||
|
be_define_const_str(CFG_X3A_X20No_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found, "CFG: No '*.autoconf' file found", 755798501u, 0, 31, &be_const_str__anonymous_);
|
||||||
be_define_const_str(CFG_X3A_X20could_X20not_X20run_X20_X25s_X20_X28_X25s_X20_X2D_X20_X25s_X29, "CFG: could not run %s (%s - %s)", 1428829580u, 0, 31, &be_const_str_json_fdump_any);
|
be_define_const_str(CFG_X3A_X20could_X20not_X20run_X20_X25s_X20_X28_X25s_X20_X2D_X20_X25s_X29, "CFG: could not run %s (%s - %s)", 1428829580u, 0, 31, &be_const_str_json_fdump_any);
|
||||||
be_define_const_str(CFG_X3A_X20downloading_X20_X27_X25s_X27, "CFG: downloading '%s'", 589480701u, 0, 21, &be_const_str_EC_C25519);
|
be_define_const_str(CFG_X3A_X20downloading_X20_X27_X25s_X27, "CFG: downloading '%s'", 589480701u, 0, 21, &be_const_str_EC_C25519);
|
||||||
be_define_const_str(CFG_X3A_X20exception_X20_X27_X25s_X27_X20_X2D_X20_X27_X25s_X27, "CFG: exception '%s' - '%s'", 4095407913u, 0, 26, &be_const_str___upper__);
|
be_define_const_str(CFG_X3A_X20exception_X20_X27_X25s_X27_X20_X2D_X20_X27_X25s_X27, "CFG: exception '%s' - '%s'", 4095407913u, 0, 26, &be_const_str___upper__);
|
||||||
|
@ -89,7 +90,6 @@ be_define_const_str(CFG_X3A_X20loaded_X20_X27_X25s_X27, "CFG: loaded '%s'", 1699
|
||||||
be_define_const_str(CFG_X3A_X20loading_X20, "CFG: loading ", 4010361503u, 0, 13, &be_const_str_CFG_X3A_X20removed_X20file_X20_X27_X25s_X27);
|
be_define_const_str(CFG_X3A_X20loading_X20, "CFG: loading ", 4010361503u, 0, 13, &be_const_str_CFG_X3A_X20removed_X20file_X20_X27_X25s_X27);
|
||||||
be_define_const_str(CFG_X3A_X20loading_X20_X27_X25s_X27, "CFG: loading '%s'", 2285306097u, 0, 17, &be_const_str_cb_do_nothing);
|
be_define_const_str(CFG_X3A_X20loading_X20_X27_X25s_X27, "CFG: loading '%s'", 2285306097u, 0, 17, &be_const_str_cb_do_nothing);
|
||||||
be_define_const_str(CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29, "CFG: multiple autoconf files found, aborting ('%s' + '%s')", 197663371u, 0, 58, NULL);
|
be_define_const_str(CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29, "CFG: multiple autoconf files found, aborting ('%s' + '%s')", 197663371u, 0, 58, NULL);
|
||||||
be_define_const_str(CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found, "CFG: no '*.autoconf' file found", 127493957u, 0, 31, &be_const_str_find);
|
|
||||||
be_define_const_str(CFG_X3A_X20ran_X20_X20, "CFG: ran ", 3579570472u, 0, 10, &be_const_str_ctypes_bytes_dyn);
|
be_define_const_str(CFG_X3A_X20ran_X20_X20, "CFG: ran ", 3579570472u, 0, 10, &be_const_str_ctypes_bytes_dyn);
|
||||||
be_define_const_str(CFG_X3A_X20removed_X20file_X20_X27_X25s_X27, "CFG: removed file '%s'", 2048602473u, 0, 22, &be_const_str_invalidate);
|
be_define_const_str(CFG_X3A_X20removed_X20file_X20_X27_X25s_X27, "CFG: removed file '%s'", 2048602473u, 0, 22, &be_const_str_invalidate);
|
||||||
be_define_const_str(CFG_X3A_X20removing_X20autoconf_X20files, "CFG: removing autoconf files", 4014704970u, 0, 28, &be_const_str_min);
|
be_define_const_str(CFG_X3A_X20removing_X20autoconf_X20files, "CFG: removing autoconf files", 4014704970u, 0, 28, &be_const_str_min);
|
||||||
|
@ -845,7 +845,7 @@ static const bstring* const m_string_table[] = {
|
||||||
(const bstring *)&be_const_str_HTTP_POST,
|
(const bstring *)&be_const_str_HTTP_POST,
|
||||||
(const bstring *)&be_const_str_list,
|
(const bstring *)&be_const_str_list,
|
||||||
(const bstring *)&be_const_str_send,
|
(const bstring *)&be_const_str_send,
|
||||||
(const bstring *)&be_const_str_CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found,
|
(const bstring *)&be_const_str_find,
|
||||||
(const bstring *)&be_const_str_SERIAL_8E2,
|
(const bstring *)&be_const_str_SERIAL_8E2,
|
||||||
NULL,
|
NULL,
|
||||||
(const bstring *)&be_const_str_consume_silence,
|
(const bstring *)&be_const_str_consume_silence,
|
||||||
|
@ -1174,7 +1174,7 @@ static const bstring* const m_string_table[] = {
|
||||||
NULL,
|
NULL,
|
||||||
(const bstring *)&be_const_str_sqrt,
|
(const bstring *)&be_const_str_sqrt,
|
||||||
NULL,
|
NULL,
|
||||||
(const bstring *)&be_const_str__anonymous_,
|
(const bstring *)&be_const_str_CFG_X3A_X20No_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found,
|
||||||
(const bstring *)&be_const_str_CFG_X3A_X20loading_X20_X27_X25s_X27,
|
(const bstring *)&be_const_str_CFG_X3A_X20loading_X20_X27_X25s_X27,
|
||||||
(const bstring *)&be_const_str_obj_event_base,
|
(const bstring *)&be_const_str_obj_event_base,
|
||||||
(const bstring *)&be_const_str__X2Esize
|
(const bstring *)&be_const_str__X2Esize
|
||||||
|
|
|
@ -976,8 +976,8 @@ be_local_closure(Autoconf_init, /* name */
|
||||||
/* K11 */ be_nested_str(_error),
|
/* K11 */ be_nested_str(_error),
|
||||||
/* K12 */ be_const_int(1),
|
/* K12 */ be_const_int(1),
|
||||||
/* K13 */ be_nested_str(log),
|
/* K13 */ be_nested_str(log),
|
||||||
/* K14 */ be_nested_str(CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found),
|
/* K14 */ be_nested_str(CFG_X3A_X20No_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found),
|
||||||
/* K15 */ be_const_int(2),
|
/* K15 */ be_const_int(3),
|
||||||
/* K16 */ be_nested_str(_archive),
|
/* K16 */ be_nested_str(_archive),
|
||||||
}),
|
}),
|
||||||
&be_const_str_init,
|
&be_const_str_init,
|
||||||
|
|
|
@ -49,7 +49,7 @@ autoconf_module.init = def (m)
|
||||||
end
|
end
|
||||||
|
|
||||||
if entry == nil
|
if entry == nil
|
||||||
tasmota.log("CFG: no '*.autoconf' file found", 2)
|
tasmota.log("CFG: No '*.autoconf' file found", 3)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ extern "C" {
|
||||||
#include "be_debug.h"
|
#include "be_debug.h"
|
||||||
void be_dumpstack(bvm *vm) {
|
void be_dumpstack(bvm *vm) {
|
||||||
int32_t top = be_top(vm);
|
int32_t top = be_top(vm);
|
||||||
AddLog(LOG_LEVEL_INFO, "BRY: top=%d", top);
|
AddLog(LOG_LEVEL_DEBUG, "BRY: top=%d", top);
|
||||||
be_tracestack(vm);
|
be_tracestack(vm);
|
||||||
for (uint32_t i = 1; i <= top; i++) {
|
for (uint32_t i = 1; i <= top; i++) {
|
||||||
const char * tname = be_typename(vm, i);
|
const char * tname = be_typename(vm, i);
|
||||||
|
|
|
@ -51,7 +51,7 @@ void checkBeTop(void) {
|
||||||
int32_t top = be_top(berry.vm);
|
int32_t top = be_top(berry.vm);
|
||||||
if (top != 0) {
|
if (top != 0) {
|
||||||
be_pop(berry.vm, top); // TODO should not be there
|
be_pop(berry.vm, top); // TODO should not be there
|
||||||
AddLog(LOG_LEVEL_ERROR, D_LOG_BERRY "Error be_top is non zero=%d", top);
|
AddLog(LOG_LEVEL_DEBUG, D_LOG_BERRY "Error be_top is non zero=%d", top);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,9 +363,9 @@ void BrLoad(const char * script_name) {
|
||||||
bool loaded = be_tobool(berry.vm, -2); // did it succeed?
|
bool loaded = be_tobool(berry.vm, -2); // did it succeed?
|
||||||
be_pop(berry.vm, 2);
|
be_pop(berry.vm, 2);
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
AddLog(LOG_LEVEL_INFO, D_LOG_BERRY "successfully loaded '%s'", script_name);
|
AddLog(LOG_LEVEL_INFO, D_LOG_BERRY "Successfully loaded '%s'", script_name);
|
||||||
} else {
|
} else {
|
||||||
AddLog(LOG_LEVEL_INFO, D_LOG_BERRY "no '%s'", script_name);
|
AddLog(LOG_LEVEL_DEBUG, D_LOG_BERRY "No '%s'", script_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue