add JAVASCRIPT label for console log

This commit is contained in:
xiaoyaofenfen 2022-04-22 15:23:07 +08:00
parent 5a5ab464be
commit 6c89a01900

View File

@ -25,7 +25,7 @@ func NewJsPlugin() *JsPlugin {
func jsLog(call goja.FunctionCall) goja.Value {
str := call.Argument(0)
buf := &strings.Builder{}
fmt.Fprintf(buf, "%+v", str.Export())
fmt.Fprintf(buf, "JAVASCRIPT: %+v", str.Export())
logger.Verboseln(buf.String())
return str
}