Skip to content

Commit

Permalink
add logger when preloading error (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpe authored Jan 12, 2021
1 parent b102b36 commit 7e2a1c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ func (c *client) OnUpdate(handler func(*ChangeEvent)) {
c.onUpdate = handler
}

// fetchAllCinfig fetch from remote, if failed load from local file
// fetchAllConfig fetch from remote, if failed load from local file
func (c *client) preload() error {
if err := c.longPoller.preload(); err != nil {
if c.skipLocalCache {
return err
}
c.logger.Infof("preload from remote error : %v", err)
return c.loadLocal(c.getDumpFileName())
}
return nil
Expand Down

0 comments on commit 7e2a1c1

Please sign in to comment.