(new): sneklog v2
Golang lint / lint (push) Successful in 1m39s

This commit is contained in:
2026-04-27 10:23:54 +03:00
parent 3aee299869
commit a34734366d
23 changed files with 245 additions and 185 deletions
+5 -5
View File
@@ -5,7 +5,7 @@ import (
"slices"
"git.scuroneko.dev/scuroneko/laniakea/tgapi"
"git.scuroneko.dev/scuroneko/slog"
"git.scuroneko.dev/scuroneko/sneklog/v2"
)
// AddPrefixes adds one or more command prefixes (e.g., "/", "!").
@@ -187,14 +187,14 @@ func (bot *Bot[T]) SetErrorTemplate(s string) *Bot[T] {
// SetDebug enables or disables debug logging.
func (bot *Bot[T]) SetDebug(debug bool) *Bot[T] {
bot.debug = debug
level := slog.FATAL
level := sneklog.FATAL
if debug {
level = slog.DEBUG
level = sneklog.DEBUG
}
bot.logger.Level(level)
if bot.RequestLogger != nil {
bot.RequestLogger.Level(level)
if bot.requestLogger != nil {
bot.requestLogger.Level(level)
}
for _, p := range bot.plugins {
if p.logger == nil {