only try to log if logger != nil

This commit is contained in:
Radu Ioan Fericean
2012-08-10 20:09:55 +03:00
parent c73cbd43e7
commit 06c6e2989f

View File

@@ -125,7 +125,9 @@ func (s *Session) SaveOperations() {
for _, cc := range s.CallCosts[1:] {
firstCC.Merge(cc)
}
s.sessionManager.GetDbLogger().Log(s.uuid, firstCC)
if s.sessionManager.GetDbLogger() != nil {
s.sessionManager.GetDbLogger().Log(s.uuid, firstCC)
}
timespans.Logger.Debug(firstCC.String())
}()
}