1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00
MiraiGo/client/log.go
2022-03-01 22:52:22 +08:00

34 lines
744 B
Go

package client
type Logger interface {
Info(format string, args ...any)
Warning(format string, args ...any)
Error(format string, args ...any)
Debug(format string, args ...any)
Dump(dumped []byte, format string, args ...any)
}
func (c *QQClient) SetLogger(logger Logger) {
c.logger = logger
}
func (c *QQClient) info(msg string, args ...any) {
c.logger.Info(msg, args...)
}
func (c *QQClient) warning(msg string, args ...any) {
c.logger.Warning(msg, args...)
}
func (c *QQClient) error(msg string, args ...any) {
c.logger.Error(msg, args...)
}
func (c *QQClient) debug(msg string, args ...any) {
c.logger.Debug(msg, args...)
}
func (c *QQClient) dump(msg string, data []byte, args ...any) {
c.logger.Dump(data, msg, args...)
}