summaryrefslogtreecommitdiff
path: root/plugins/logger
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-04-18 17:31:52 +0300
committerValery Piashchynski <[email protected]>2021-04-18 17:31:52 +0300
commit4e6dfc00c5619c4e749602d345fd2829ab0a3f07 (patch)
tree12b4ce7644b02b6e76cfa46e8c80d54690d6e0dc /plugins/logger
parent15b7a9a0fc074531f9b46bb87fb35819e248a58c (diff)
- Draft implementation of the service plugin
Diffstat (limited to 'plugins/logger')
-rw-r--r--plugins/logger/config.go2
-rw-r--r--plugins/logger/plugin.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/logger/config.go b/plugins/logger/config.go
index eee5fb71..c435e8be 100644
--- a/plugins/logger/config.go
+++ b/plugins/logger/config.go
@@ -22,7 +22,7 @@ type Config struct {
// level of all loggers descended from this config.
Level string `mapstructure:"level"`
- // Encoding sets the logger's encoding. Valid values are "json" and
+ // Encoding sets the logger's encoding. InitDefault values are "json" and
// "console", as well as any third-party encodings registered via
// RegisterEncoder.
Encoding string `mapstructure:"encoding"`
diff --git a/plugins/logger/plugin.go b/plugins/logger/plugin.go
index 08fc2454..e1066cba 100644
--- a/plugins/logger/plugin.go
+++ b/plugins/logger/plugin.go
@@ -69,7 +69,7 @@ func (z *ZapLogger) NamedLogger(name string) (Logger, error) {
return NewZapAdapter(z.base.Named(name)), nil
}
-// NamedLogger returns logger dedicated to the specific channel. Similar to Named() but also reads the core params.
+// ServiceLogger returns logger dedicated to the specific channel. Similar to Named() but also reads the core params.
func (z *ZapLogger) ServiceLogger(n endure.Named) (Logger, error) {
return z.NamedLogger(n.Name())
}
@@ -78,5 +78,6 @@ func (z *ZapLogger) ServiceLogger(n endure.Named) (Logger, error) {
func (z *ZapLogger) Provides() []interface{} {
return []interface{}{
z.ServiceLogger,
+ z.DefaultLogger,
}
}