Skip to content

Commit

Permalink
Added console.debug/info/warn/error as aliases of console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Jan 2, 2024
1 parent 78ecd8a commit 08fca8d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
Microbit2: Set up SCK/LRCK to unused pins for neopixel to ensure neopixel will work ok
ESP8266/others: Fix ArrayBuffers with 12 bit JsVars (previously they overflowed)
Ensure E.setDST disables E.setTimeZone, and vice-versa.
Added console.debug/info/warn/error as aliases of console.log

2v19 : Fix Object.values/entries for numeric keys after 2v18 regression (fix #2375)
nRF52: for SD>5 use static buffers for advertising and scan response data (#2367)
Expand Down
44 changes: 44 additions & 0 deletions src/jswrap_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,3 +591,47 @@ void jswrap_print(JsVar *v) {
}


/*JSON{
"type" : "staticmethod",
"class" : "console",
"name" : "debug",
"generate" : "jswrap_print",
"params" : [
["text","JsVarArray","One or more arguments to print"]
]
}
Implemented in Espruino as an alias of `console.log`
*/
/*JSON{
"type" : "staticmethod",
"class" : "console",
"name" : "info",
"generate" : "jswrap_print",
"params" : [
["text","JsVarArray","One or more arguments to print"]
]
}
Implemented in Espruino as an alias of `console.log`
*/
/*JSON{
"type" : "staticmethod",
"class" : "console",
"name" : "warn",
"generate" : "jswrap_print",
"params" : [
["text","JsVarArray","One or more arguments to print"]
]
}
Implemented in Espruino as an alias of `console.log`
*/
/*JSON{
"type" : "staticmethod",
"class" : "console",
"name" : "error",
"generate" : "jswrap_print",
"params" : [
["text","JsVarArray","One or more arguments to print"]
]
}
Implemented in Espruino as an alias of `console.log`
*/

0 comments on commit 08fca8d

Please sign in to comment.