MM-39690: Clean up some unnecessary logs (#20368)

These logs would appear at every request
and didn't have any useful info for the admin.
It was more of a developer logging thing
and therefore removing it.

https://mattermost.atlassian.net/browse/MM-39690
```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-06-07 21:21:36 +05:30
коммит произвёл GitHub
родитель ce84a5d190
Коммит 319a2b2428
5 изменённых файлов: 0 добавлений и 18 удалений

Просмотреть файл

@@ -32,7 +32,6 @@ func (s SearchFileInfoStore) indexFile(file *model.FileInfo) {
mlog.Error("Encountered error indexing file", mlog.String("file_info_id", file.Id), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err))
return
}
mlog.Debug("Indexed file in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("file_info_id", file.Id))
})
}
}
@@ -46,7 +45,6 @@ func (s SearchFileInfoStore) deleteFileIndex(fileID string) {
mlog.Error("Encountered error deleting file", mlog.String("file_info_id", fileID), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err))
return
}
mlog.Debug("Removed file from the index in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("file_info_id", fileID))
})
}
}
@@ -172,7 +170,6 @@ func (s SearchFileInfoStore) Search(paramsList []*model.SearchParams, userId, te
mlog.Error("Encountered error on Search.", mlog.String("search_engine", engine.GetName()), mlog.Err(appErr))
continue
}
mlog.Debug("Using the first available search engine", mlog.String("search_engine", engine.GetName()))
// Get the files
filesList := model.NewFileInfoList()
@@ -191,10 +188,8 @@ func (s SearchFileInfoStore) Search(paramsList []*model.SearchParams, userId, te
}
if *s.rootStore.getConfig().SqlSettings.DisableDatabaseSearch {
mlog.Debug("Returning empty results for file Search as the database search is disabled")
return model.NewFileInfoList(), nil
}
mlog.Debug("Using database search because no other search engine is available")
return s.FileInfoStore.Search(paramsList, userId, teamId, page, perPage)
}

Просмотреть файл

@@ -32,7 +32,6 @@ func (s SearchPostStore) indexPost(post *model.Post) {
mlog.Warn("Encountered error indexing post", mlog.String("post_id", post.Id), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err))
return
}
mlog.Debug("Indexed post in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("post_id", post.Id))
})
}
}
@@ -46,7 +45,6 @@ func (s SearchPostStore) deletePostIndex(post *model.Post) {
mlog.Warn("Encountered error deleting post", mlog.String("post_id", post.Id), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err))
return
}
mlog.Debug("Removed post from the index in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("post_id", post.Id))
})
}
}
@@ -185,16 +183,13 @@ func (s SearchPostStore) SearchPostsForUser(paramsList []*model.SearchParams, us
mlog.Warn("Encountered error on SearchPostsInTeamForUser.", mlog.String("search_engine", engine.GetName()), mlog.Err(err))
continue
}
mlog.Debug("Using the first available search engine", mlog.String("search_engine", engine.GetName()))
return results, err
}
}
if *s.rootStore.getConfig().SqlSettings.DisableDatabaseSearch {
mlog.Debug("Returning empty results for post SearchPostsInTeam as the database search is disabled")
return &model.PostSearchResults{PostList: model.NewPostList(), Matches: model.PostSearchMatches{}}, nil
}
mlog.Debug("Using database search because no other search engine is available")
return s.PostStore.SearchPostsForUser(paramsList, userId, teamId, page, perPage)
}