feat: create init log system

This commit is contained in:
2026-04-04 15:25:58 +03:00
parent 3a89106c1b
commit b6d701c9e0
4 changed files with 53 additions and 0 deletions
+13
View File
@@ -5,6 +5,7 @@ import (
"log"
"github.com/ilyakaznacheev/cleanenv"
"github.com/rs/zerolog"
)
type Config struct {
@@ -40,3 +41,15 @@ func (c *Config) GetURLPostgres() string {
c.DBPort,
c.DBName)
}
func (c *Config) GetLogLevel() zerolog.Level {
level, err := zerolog.ParseLevel(c.LogLevel)
if err != nil {
return zerolog.InfoLevel
}
return level
}
func (c *Config) GetMode() string {
return c.Mode
}