timetable-extension #1
@ -25,7 +25,7 @@ func CheckCorpus(cfg *helpers.Configuration) {
|
||||
log.Debug("CORPUS Data", zap.Duration("Data Age", dataAge), zap.Duration("Max Age", 14*24*time.Hour))
|
||||
|
||||
if dataAge >= fortnight {
|
||||
log.Info("CORPUS Data is more than two weeks old")
|
||||
log.Info("CORPUS update required")
|
||||
err := RunCorpusUpdate(cfg)
|
||||
if err != nil {
|
||||
log.Warn("CORPUS Update did not run")
|
||||
@ -33,6 +33,6 @@ func CheckCorpus(cfg *helpers.Configuration) {
|
||||
log.Info("CORPUS data has been updated")
|
||||
}
|
||||
} else {
|
||||
log.Info("CORPUS Data is less than two weeks old, not updating")
|
||||
log.Info("CORPUS Data not stale, skipping updating")
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ func InitLogger() {
|
||||
}
|
||||
|
||||
config := zap.NewDevelopmentConfig()
|
||||
config.DisableStacktrace = true
|
||||
config.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
|
||||
config.Level = zap.NewAtomicLevelAt(level)
|
||||
post, err = config.Build(zap.AddCallerSkip(1))
|
||||
|
Loading…
Reference in New Issue
Block a user