add structured logging with Loki integration

This commit is contained in:
dalbodeule
2025-10-16 19:50:41 +09:00
parent 33ffd13663
commit 486d18d207
5 changed files with 1988 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ type Config struct {
CountryBlacklist []string
PgDsn string
RootPath string
LokiHost string
}
func GetConfig() *Config {
@@ -23,6 +24,7 @@ func GetConfig() *Config {
countryBlacklist := os.Getenv("COUNTRY_BLACKLIST")
pgDsn := os.Getenv("DB_DSN")
rootPath := os.Getenv("ROOT_PATH")
lokiHost := os.Getenv("LOKI_HOST")
return &Config{
Port: port,
@@ -30,5 +32,6 @@ func GetConfig() *Config {
CountryBlacklist: strings.Split(countryBlacklist, ","),
PgDsn: pgDsn,
RootPath: rootPath,
LokiHost: lokiHost,
}
}