You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Log*(null) or Log*("{0}", null) makes the logger throw:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Extensions.Logging.Internal.FormattedLogValues..ctor(String format, Object[] values)
at Microsoft.Extensions.Logging.LoggerExtensions.LogTrace(ILogger logger, String message, Object[] args)
at WebApplicationLoggingNetFramework.Startup.Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) in C:\Users\cesars\Documents\Visual Studio 2015\Projects\WebApplicationLoggingNetFramework\src\WebApplicationLoggingNetFramework\Startup.cs:line 32
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.Startup.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
Logging should be more resilient to this. Print (null) or something similar when a null is logged.
The text was updated successfully, but these errors were encountered:
cesarblum
changed the title
Passing null for message or message args makes logger throws
Passing null for message or message args makes logger throw
Jun 10, 2016
cesarblum
changed the title
Passing null for message or message args makes logger throw
Loggers throw on null message or arguments
Jun 10, 2016
Part of https://github.com/aspnet/Release/issues/31
Log*(null)
orLog*("{0}", null)
makes the logger throw:Logging should be more resilient to this. Print
(null)
or something similar when a null is logged.The text was updated successfully, but these errors were encountered: