add debug to init func
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
ad6912beef
commit
e0cbe28c8f
@ -68,9 +68,12 @@ func (c *consulConfig) Init(opts ...config.Option) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cli, err := api.NewClient(cfg)
|
cli, err := api.NewClient(cfg)
|
||||||
if err != nil && !c.opts.AllowFail {
|
if err != nil {
|
||||||
|
c.opts.Logger.Errorf(c.opts.Context, "consul init err: %v", err)
|
||||||
|
if !c.opts.AllowFail {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
c.cli = cli
|
c.cli = cli
|
||||||
c.path = path
|
c.path = path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user