lemmy-reply-bot/logger.go

19 lines
233 B
Go
Raw Normal View History

2022-12-11 04:08:29 +00:00
package main
import (
"os"
2023-04-21 03:04:46 +00:00
"go.elara.ws/logger"
"go.elara.ws/logger/log"
2022-12-11 04:08:29 +00:00
)
func init() {
l := logger.NewPretty(os.Stderr)
if os.Getenv("LEMMY_REPLY_BOT_DEBUG") == "1" {
l.Level = logger.LogLevelDebug
}
log.Logger = l
}