Reacting to verbose rename

This commit is contained in:
John Luo 2015-12-02 17:58:34 -08:00
parent 7009e68fc3
commit ee7201b1f6
2 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,6 @@ using Microsoft.AspNet.Builder;
using Microsoft.AspNet.StaticFiles; using Microsoft.AspNet.StaticFiles;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;
namespace StaticFilesSample namespace StaticFilesSample
{ {
@ -16,7 +15,7 @@ namespace StaticFilesSample
public void Configure(IApplicationBuilder app, ILoggerFactory factory) public void Configure(IApplicationBuilder app, ILoggerFactory factory)
{ {
// Displays all log levels // Displays all log levels
factory.AddConsole(LogLevel.Verbose); factory.AddConsole(LogLevel.Debug);
app.UseFileServer(new FileServerOptions() app.UseFileServer(new FileServerOptions()
{ {

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNet.StaticFiles
static LoggerExtensions() static LoggerExtensions()
{ {
_logMethodNotSupported = LoggerMessage.Define<string>( _logMethodNotSupported = LoggerMessage.Define<string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 1, eventId: 1,
formatString: "{Method} requests are not supported"); formatString: "{Method} requests are not supported");
_logFileServed = LoggerMessage.Define<string, string>( _logFileServed = LoggerMessage.Define<string, string>(
@ -37,15 +37,15 @@ namespace Microsoft.AspNet.StaticFiles
eventId: 2, eventId: 2,
formatString: "Sending file. Request path: '{VirtualPath}'. Physical path: '{PhysicalPath}'"); formatString: "Sending file. Request path: '{VirtualPath}'. Physical path: '{PhysicalPath}'");
_logPathMismatch = LoggerMessage.Define<string>( _logPathMismatch = LoggerMessage.Define<string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 3, eventId: 3,
formatString: "The request path {Path} does not match the path filter"); formatString: "The request path {Path} does not match the path filter");
_logFileTypeNotSupported = LoggerMessage.Define<string>( _logFileTypeNotSupported = LoggerMessage.Define<string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 4, eventId: 4,
formatString: "The request path {Path} does not match a supported file type"); formatString: "The request path {Path} does not match a supported file type");
_logFileNotFound = LoggerMessage.Define<string>( _logFileNotFound = LoggerMessage.Define<string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 5, eventId: 5,
formatString: "The request path {Path} does not match an existing file"); formatString: "The request path {Path} does not match an existing file");
_logPathNotModified = LoggerMessage.Define<string>( _logPathNotModified = LoggerMessage.Define<string>(
@ -57,7 +57,7 @@ namespace Microsoft.AspNet.StaticFiles
eventId: 7, eventId: 7,
formatString: "Precondition for {Path} failed"); formatString: "Precondition for {Path} failed");
_logHandled = LoggerMessage.Define<int, string>( _logHandled = LoggerMessage.Define<int, string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 8, eventId: 8,
formatString: "Handled. Status code: {StatusCode} File: {Path}"); formatString: "Handled. Status code: {StatusCode} File: {Path}");
_logRangeNotSatisfiable = LoggerMessage.Define<string>( _logRangeNotSatisfiable = LoggerMessage.Define<string>(
@ -69,11 +69,11 @@ namespace Microsoft.AspNet.StaticFiles
eventId: 10, eventId: 10,
formatString: "Sending {Range} of file {Path}"); formatString: "Sending {Range} of file {Path}");
_logCopyingFileRange = LoggerMessage.Define<StringValues, string>( _logCopyingFileRange = LoggerMessage.Define<StringValues, string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 11, eventId: 11,
formatString: "Copying {Range} of file {Path} to the response body"); formatString: "Copying {Range} of file {Path} to the response body");
_logCopyingBytesToResponse = LoggerMessage.Define<long, string, string>( _logCopyingBytesToResponse = LoggerMessage.Define<long, string, string>(
logLevel: LogLevel.Verbose, logLevel: LogLevel.Debug,
eventId: 12, eventId: 12,
formatString: "Copying bytes {Start}-{End} of file {Path} to response body"); formatString: "Copying bytes {Start}-{End} of file {Path} to response body");
_logMultipleFileRanges = LoggerMessage.Define<string>( _logMultipleFileRanges = LoggerMessage.Define<string>(