mirror of
https://github.com/bettercap/bettercap.git
synced 2024-11-03 04:00:07 -08:00
49 lines
972 B
Go
49 lines
972 B
Go
package js
|
|
|
|
import (
|
|
"github.com/evilsocket/islazy/log"
|
|
"github.com/robertkrimen/otto"
|
|
)
|
|
|
|
func flog(call otto.FunctionCall) otto.Value {
|
|
for _, v := range call.ArgumentList {
|
|
log.Info("%s", v.String())
|
|
}
|
|
return otto.Value{}
|
|
}
|
|
|
|
func log_debug(call otto.FunctionCall) otto.Value {
|
|
for _, v := range call.ArgumentList {
|
|
log.Debug("%s", v.String())
|
|
}
|
|
return otto.Value{}
|
|
}
|
|
|
|
func log_info(call otto.FunctionCall) otto.Value {
|
|
for _, v := range call.ArgumentList {
|
|
log.Info("%s", v.String())
|
|
}
|
|
return otto.Value{}
|
|
}
|
|
|
|
func log_warn(call otto.FunctionCall) otto.Value {
|
|
for _, v := range call.ArgumentList {
|
|
log.Warning("%s", v.String())
|
|
}
|
|
return otto.Value{}
|
|
}
|
|
|
|
func log_error(call otto.FunctionCall) otto.Value {
|
|
for _, v := range call.ArgumentList {
|
|
log.Error("%s", v.String())
|
|
}
|
|
return otto.Value{}
|
|
}
|
|
|
|
func log_fatal(call otto.FunctionCall) otto.Value {
|
|
for _, v := range call.ArgumentList {
|
|
log.Fatal("%s", v.String())
|
|
}
|
|
return otto.Value{}
|
|
}
|