This commit is contained in:
cdle
2023-06-30 13:58:31 +08:00
parent 9c09a5588b
commit 6f1f9f0dc9
5 changed files with 68 additions and 7 deletions
+3
View File
@@ -41,6 +41,7 @@ type SenderJsIplm struct {
}
type Console struct {
UUID string
}
var console = &Console{}
@@ -77,6 +78,7 @@ func (c *Console) Warn(v ...interface{}) {
}
log := utils.FormatLog(v[0], v[1:]...)
logs.Warn(log)
WritePluginMessage(c.UUID, "warn", log)
Broadcast2WebUser(log, "warn")
}
@@ -86,6 +88,7 @@ func (c *Console) Error(v ...interface{}) {
}
log := utils.FormatLog(v[0], v[1:]...)
logs.Error(log)
WritePluginMessage(c.UUID, "error", log)
Broadcast2WebUser(log, "error")
}