feat: add Logbull remote logging via slog handler, tee to stdout

This commit is contained in:
2026-06-27 15:17:59 +08:00
parent 835b92ec00
commit c5225d8c97
5 changed files with 122 additions and 4 deletions
+8
View File
@@ -14,6 +14,7 @@ type Config struct {
Redis RedisConfig `mapstructure:"redis"`
SMTP SMTPConfig `mapstructure:"smtp"`
RateLimit RateLimitConfig `mapstructure:"rate_limit"`
Logbull LogbullConfig `mapstructure:"logbull"`
}
type ServerConfig struct {
@@ -57,6 +58,13 @@ type RateLimitConfig struct {
Default int `mapstructure:"default"`
}
type LogbullConfig struct {
Host string `mapstructure:"host"`
ProjectID string `mapstructure:"project_id"`
APIKey string `mapstructure:"api_key"`
LogLevel string `mapstructure:"log_level"`
}
func Load(path string) (*Config, error) {
v := viper.New()
v.SetConfigFile(path)