Skip to content

Hw12 13 14 15 calendar#16

Draft
AlexandrLitkevich wants to merge 10 commits intomasterfrom
hw12_13_14_15_calendar
Draft

Hw12 13 14 15 calendar#16
AlexandrLitkevich wants to merge 10 commits intomasterfrom
hw12_13_14_15_calendar

Conversation

@AlexandrLitkevich
Copy link
Copy Markdown
Owner

No description provided.

@AlexandrLitkevich AlexandrLitkevich marked this pull request as draft January 30, 2024 12:51
func New(level string) *Logger {
return &Logger{}
}
//levelLog := viper.Get("logger.level") //Maybe ???
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Стоит так получать уровень логгера?Или же стоит парсить конфиг как я сделал в main.go ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, в основном его так и получают. Можно и из конфига, это зависит от того как на каком проекте принято.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Спасибо)

}
fmt.Println("This my cfg", slog.String("This CFG", cfg.Logger.Level))

logg := logger.New(cfg.Logger.Level)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Или лучше передавать из конфига?Обращение в viper дорогое?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants