Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-12-08 00:38:37 +03:00
parent f63ff80d46
commit b7b28f6b9a
29 changed files with 138 additions and 85 deletions

View File

@@ -6,8 +6,10 @@ import (
"os"
)
// Option func
type Option func(*Options)
// Options holds logger options
type Options struct {
// The logging level the logger should log at. default is `InfoLevel`
Level Level
@@ -21,6 +23,7 @@ type Options struct {
Context context.Context
}
// NewOptions creates new options struct
func NewOptions(opts ...Option) Options {
options := Options{
Level: InfoLevel,