* improve logging

This commit is contained in:
Simon Zolin 2019-05-08 10:43:47 +03:00
parent 3a0f608402
commit 0f28a989e9
2 changed files with 2 additions and 0 deletions

1
app.go
View file

@ -372,6 +372,7 @@ func cleanupAlways() {
if len(pidFileName) != 0 { if len(pidFileName) != 0 {
os.Remove(pidFileName) os.Remove(pidFileName)
} }
log.Info("Stopped")
} }
// command-line arguments // command-line arguments

View file

@ -37,6 +37,7 @@ func (l *queryLog) flushLogBuffer() error {
// flushToFile saves the specified log entries to the query log file // flushToFile saves the specified log entries to the query log file
func (l *queryLog) flushToFile(buffer []*logEntry) error { func (l *queryLog) flushToFile(buffer []*logEntry) error {
if len(buffer) == 0 { if len(buffer) == 0 {
log.Debug("querylog: there's nothing to write to a file")
return nil return nil
} }
start := time.Now() start := time.Now()