Skip to content

Commit 08fca8d

Browse files
committed
Added console.debug/info/warn/error as aliases of console.log
1 parent 78ecd8a commit 08fca8d

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
Microbit2: Set up SCK/LRCK to unused pins for neopixel to ensure neopixel will work ok
4444
ESP8266/others: Fix ArrayBuffers with 12 bit JsVars (previously they overflowed)
4545
Ensure E.setDST disables E.setTimeZone, and vice-versa.
46+
Added console.debug/info/warn/error as aliases of console.log
4647

4748
2v19 : Fix Object.values/entries for numeric keys after 2v18 regression (fix #2375)
4849
nRF52: for SD>5 use static buffers for advertising and scan response data (#2367)

src/jswrap_functions.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,3 +591,47 @@ void jswrap_print(JsVar *v) {
591591
}
592592

593593

594+
/*JSON{
595+
"type" : "staticmethod",
596+
"class" : "console",
597+
"name" : "debug",
598+
"generate" : "jswrap_print",
599+
"params" : [
600+
["text","JsVarArray","One or more arguments to print"]
601+
]
602+
}
603+
Implemented in Espruino as an alias of `console.log`
604+
*/
605+
/*JSON{
606+
"type" : "staticmethod",
607+
"class" : "console",
608+
"name" : "info",
609+
"generate" : "jswrap_print",
610+
"params" : [
611+
["text","JsVarArray","One or more arguments to print"]
612+
]
613+
}
614+
Implemented in Espruino as an alias of `console.log`
615+
*/
616+
/*JSON{
617+
"type" : "staticmethod",
618+
"class" : "console",
619+
"name" : "warn",
620+
"generate" : "jswrap_print",
621+
"params" : [
622+
["text","JsVarArray","One or more arguments to print"]
623+
]
624+
}
625+
Implemented in Espruino as an alias of `console.log`
626+
*/
627+
/*JSON{
628+
"type" : "staticmethod",
629+
"class" : "console",
630+
"name" : "error",
631+
"generate" : "jswrap_print",
632+
"params" : [
633+
["text","JsVarArray","One or more arguments to print"]
634+
]
635+
}
636+
Implemented in Espruino as an alias of `console.log`
637+
*/

0 commit comments

Comments
 (0)