You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
timestamp format to use in log lines, standard time.Time formats are
32
32
supported, see [time.Time.Format](https://golang.org/pkg/time/#Time.Format)
33
33
34
34
***output** - set of properties with ```log.output.``` prefix describes
35
35
logger output configuration.
36
36
37
-
***type** (default: file) - type of the logger output. Two types are
37
+
***type** (default: file & stdout) - type of the logger output. You can specify one or several values at the same time by using an array [(examples are provided below)](#examples). Types are
Adding a new hook implementation is trivial. You should implement factory method
163
-
which inputs hook configuration as [Viper](https://godoc.org/github.com/spf13/viper#Viper)
164
-
config and returns new instance of the Hook structure. Then register the new hook
165
-
type by calling RegisterHookType() function from init() method.
169
+
### Adding new hooks implementations
166
170
167
-
Please see "email" hook implementation as example in hook.go file
171
+
Adding a new hook implementation is trivial. You should implement interface hook with method `call` which inputs `entry zapcore.Entry`. Also you need impelement init method which inputs configuration as [Viper](https://godoc.org/github.com/spf13/viper#Viper) config and returns new instance of the Hook structure. Then register the new hook
172
+
type by calling RegisterHookType() function from init() method. Please see "email" hook implementation as example in hook.go file.
0 commit comments