mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 07:10:56 +03:00
initprovider: add load data options
Fixes #741 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -46,6 +46,10 @@ type StdLoggerWrapper struct {
|
||||
Sender string
|
||||
}
|
||||
|
||||
func init() {
|
||||
zerolog.TimeFieldFormat = dateFormat
|
||||
}
|
||||
|
||||
// Write implements the io.Writer interface. This is useful to set as a writer
|
||||
// for the standard library log.
|
||||
func (l *StdLoggerWrapper) Write(p []byte) (n int, err error) {
|
||||
@@ -138,7 +142,6 @@ func GetLogger() *zerolog.Logger {
|
||||
|
||||
// SetLogTime sets logging time related setting
|
||||
func SetLogTime(utc bool) {
|
||||
zerolog.TimeFieldFormat = dateFormat
|
||||
if utc {
|
||||
zerolog.TimestampFunc = func() time.Time {
|
||||
return time.Now().UTC()
|
||||
|
||||
Reference in New Issue
Block a user