Implemented full tgapi method coverage from Telegram docs, aligned numeric ID/file_size types, and fixed method signatures/JSON tags.; Standardized GoDoc across exported APIs with Telegram links and refreshed README sections for MsgContext plus API/Uploader usage.
17 lines
272 B
Go
17 lines
272 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
|
|
"git.nix13.pw/scuroneko/slog"
|
|
)
|
|
|
|
// GetLoggerLevel returns DEBUG when DEBUG=true in env, otherwise FATAL.
|
|
func GetLoggerLevel() slog.LogLevel {
|
|
level := slog.FATAL
|
|
if os.Getenv("DEBUG") == "true" {
|
|
level = slog.DEBUG
|
|
}
|
|
return level
|
|
}
|