initprovider: add load data options

Fixes #741

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-02-28 17:05:18 +01:00
parent 816c174036
commit 1ea7429921
10 changed files with 84 additions and 63 deletions

View File

@@ -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()