move a warning back to debug

This commit is contained in:
Cyberes 2024-03-14 17:05:31 -06:00
parent c19304c65f
commit c73d17a2ec
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ func addToElasticsearch(fullPath string, info os.FileInfo, incomingErr error) er
if !shouldExclude(relPath, config.GetConfig().ElasticsearchExcludePatterns) {
cacheItem, found := SharedCache.Cache.Get(relPath)
if !found {
// I don't think this should ever happen
log.Errorf(`ELASTICSEARCH - path "%s" exists on disk, but not in the LRU cache. Deleting from Elastic.`, relPath)
// This sort of thing can happen if new files have been added on disk but a scan has not been run to refresh the cache.
log.Debugf(`ELASTICSEARCH - path "%s" exists on disk, but not in the LRU cache. Deleting from Elastic.`, relPath)
// Delete this item from Elastic in order to avoid any strange inconsistencies.
err := deleteFromElasticsearch(encodeToBase64(relPath))
if err != nil {