Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1655 by only logging Verbose messages from ContentService. #1671

Merged
merged 1 commit into from
Oct 31, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/NuGetGallery/Services/ContentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ private async Task<HtmlString> GetContentItemCore(string name, TimeSpan expiresI
ContentItem item = null;
if (ContentCache.TryGetValue(name, out item) && DateTime.UtcNow < item.ExpiryUtc)
{
Trace.Information("Cache Valid. Expires at: " + item.ExpiryUtc.ToString());
Trace.Verbose("Cache Valid. Expires at: " + item.ExpiryUtc.ToString());
return item.Content;
}
Trace.Information("Cache Expired.");
Trace.Verbose("Cache Expired.");

// Get the file from the content service
string fileName = name + ContentFileExtension;
Expand All @@ -85,26 +85,26 @@ private async Task<HtmlString> GetContentItemCore(string name, TimeSpan expiresI
HtmlString result = new HtmlString(String.Empty);
if (reference == null)
{
Trace.Error("Requested Content File Not Found: " + fileName);
Trace.Verbose("Requested Content File Not Found: " + fileName);
}
else
{
// Check the content ID to see if it's different
if (item != null && String.Equals(item.ContentId, reference.ContentId, StringComparison.Ordinal))
{
Trace.Information("No change to content item. Using Cache");
Trace.Verbose("No change to content item. Using Cache");
// No change, just use the cache.
result = item.Content;
}
else
{
// Process the file
Trace.Information("Content Item changed. Updating...");
Trace.Verbose("Content Item changed. Updating...");
using (var stream = reference.OpenRead())
{
if (stream == null)
{
Trace.Error("Requested Content File Not Found: " + fileName);
Trace.Verbose("Requested Content File Not Found: " + fileName);
reference = null;
}
else
Expand Down