MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / Rotate

Method Rotate

log/writer_syslog.go:108–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106}
107
108func (s *syslogWriter) Rotate() error {
109 s.lock.Lock()
110 defer s.lock.Unlock()
111 if err := s.config.Validate(); err != nil {
112 return err
113 }
114 if err := s.connection.Close(); err != nil {
115 return message.Wrap(err, message.ELogRotateFailed, "failed to close old syslog connection")
116 }
117 s.connection = s.config.Connection
118 return nil
119}
120
121func (s *syslogWriter) Close() error {
122 return s.connection.Close()

Callers

nothing calls this directly

Calls 3

WrapFunction · 0.92
ValidateMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected