MSP-325 add new logger

This commit is contained in:
DeniskaRediska committed 2021-10-22 11:00:49 +03:00
1 parent 71e78d01e7
commit 05bdf75e95
7 files changed
+259

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package log
type Option func(a *Adapter)
func WithDevelopmentMode() Option {
return func(a *Adapter) {
a.devMode = true
}
}
func WithFileRotation(r Rotation) Option {
return func(a *Adapter) {
a.rotation = &r
}
}
func WithLevel(level Level) Option {
return func(a *Adapter) {
a.initialLevel = level
}
}