services: update logs flush after services shutdown
Added sync logs for every service separately to provide the ability to have a custom logger for each service. This commit makes the code follow the zap usages rules: `Sync calls the underlying Core's Sync method, flushing any buffered log entries. Applications should take care to call Sync before exiting.` Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
9b540770cd
commit
5bb7c6b715
8 changed files with 9 additions and 0 deletions
|
@ -320,6 +320,8 @@ func (s *Server) Shutdown() {
|
|||
}
|
||||
close(s.quit)
|
||||
<-s.relayFin
|
||||
|
||||
_ = s.log.Sync()
|
||||
}
|
||||
|
||||
// AddService allows to add a service to be started/stopped by Server.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue