Lower warn log level, skip empty emails

This commit is contained in:
2023-12-30 16:24:39 -06:00
parent 4e01cf0dbb
commit 1662227606
2 changed files with 5 additions and 1 deletions

View File

@@ -345,7 +345,7 @@ func GetFullEntryCached(id string) (*FullEntry, error) {
// Check if key was found
if err == badger.ErrKeyNotFound {
log.Warn().Str("key", key).Msg("Entry Cache Not Found")
log.Debug().Str("key", key).Msg("Entry Cache Not Found")
return nil
} else if err != nil {
return errors.Wrap(err, "failed to get entry cache")

View File

@@ -170,6 +170,10 @@ func main() {
log.Fatal().Err(err).Msg("Failed to get full entry")
}
if fullEntry.Email == "" {
log.Warn().Str("name", fullEntry.Name).Msg("Entry has no email")
continue
}
log.Debug().Str("name", fullEntry.Name).Str("email", fullEntry.Email).Msg("Entry Processed")
entries <- fullEntry.Email
}