Peter Kurfer
9ea9a8f658
Some checks failed
Go build / build (push) Failing after 1m58s
- setup ent scheme - add command to create users - document API - add helpers to create migrations - add command to run migrations - add basic compose file
17 lines
371 B
Go
17 lines
371 B
Go
package config
|
|
|
|
import (
|
|
"log/slog"
|
|
)
|
|
|
|
type Logging struct {
|
|
AddSource bool `env:"LOG_ADD_SOURCE" name:"add-source" default:"false"`
|
|
Level slog.Level `env:"LOG_LEVEL" name:"level" default:"info" help:"Log level to apply"`
|
|
}
|
|
|
|
func (l Logging) Options() *slog.HandlerOptions {
|
|
return &slog.HandlerOptions{
|
|
Level: l.Level,
|
|
AddSource: l.AddSource,
|
|
}
|
|
}
|