-
Notifications
You must be signed in to change notification settings - Fork 245
Logging a null value #335
Comments
Oh, one possible easy fix, }
return string.Format(CultureInfo.InvariantCulture, _format, values); to return string.Format(CultureInfo.InvariantCulture, _format, values);
}
return string.Format(CultureInfo.InvariantCulture, _format, (object)null); |
@BrennanConroy Could you investigate? |
@veccsolutions What's the type of |
@muratg token is a string value. |
string token = null; |
I noticed that even doing logger.Info(null) blows up. I don't think a logger should ever throw an exception.. |
I'd rather say that the logging infrastructure should never throw an exception. But loggers themselves - well, if they have major errors (or simply a bug), they might throw, and the logging infrastructure will let it bubble up. We don't want the logging infrastructure to hide bugs in loggers. |
Agreed with @Eilon. This bug is about finding out if the abstractions are at fault or specific implementations. |
@muratg Our loggers should still be resilient to this though. |
I'll close this in favor of #422. |
When calling
and token is null string, I get an argument null exception.
I would have expected it to have logged "Unable to resolve token: <>"
Here is the stack trace:
The text was updated successfully, but these errors were encountered: