Skip to content

Commit

Permalink
fix: log options
Browse files Browse the repository at this point in the history
  • Loading branch information
23doors committed Jul 30, 2020
1 parent 1ebb215 commit 22fa9fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ type Config struct {
LogLevel string
}

func WithDebug(config *Config) {
config.Debug = true
func WithDebug(debug bool) func(*Config) {
return func(config *Config) {
config.Debug = debug
}
}

func WithLogLevel(logLevel string) func(*Config) {
return func(config *Config) {
config.Debug = true
config.LogLevel = logLevel
}
}

Expand Down

0 comments on commit 22fa9fa

Please sign in to comment.