mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 17:10:28 +00:00
4e41a5583d
The common package defines the interfaces that a protocol must implement and contain code that can be shared among supported protocols. This way should be easier to support new protocols
17 lines
221 B
Go
17 lines
221 B
Go
package logger
|
|
|
|
import (
|
|
"os"
|
|
"sync"
|
|
)
|
|
|
|
type logSyncWrapper struct {
|
|
sync.Mutex
|
|
output *os.File
|
|
}
|
|
|
|
func (l *logSyncWrapper) Write(b []byte) (n int, err error) {
|
|
l.Lock()
|
|
defer l.Unlock()
|
|
return l.output.Write(b)
|
|
}
|