diff --git a/rotater/wrapped.go b/rotater/wrapped.go index 43f7f31..be23e78 100644 --- a/rotater/wrapped.go +++ b/rotater/wrapped.go @@ -2,16 +2,17 @@ package rotater import ( "sync" + "amuz.es/src/infra/logger" ) type LockedWriteSyncer struct { sync.Mutex - ws WriteSyncer + ws logger.WriteSyncer } // Lock wraps a WriteSyncer in a mutex to make it safe for concurrent use. In // particular, *os.Files must be locked before use. -func newLocked(ws WriteSyncer) RotateSyncer { +func newLocked(ws logger.WriteSyncer) logger.RotateSyncer { if lws, ok := ws.(*LockedWriteSyncer); ok { // no need to layer on another lock return lws @@ -33,6 +34,6 @@ func (s *LockedWriteSyncer) Sync() error { return err } -func (r *LockedWriteSyncer) SetOnClose(closeFunc CloseFunc) {} +func (r *LockedWriteSyncer) SetOnClose(closeFunc logger.CloseFunc) {} func (r *LockedWriteSyncer) Rotate() (err error) { return } func (r *LockedWriteSyncer) Close() (err error) { return }