Skip to content

Commit dd3cbfb

Browse files
committed
Update ILogger documentation to clarify formatter behavior when using extension methods
1 parent 1667ba9 commit dd3cbfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/Microsoft.Extensions.Logging/ILogger.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<param name="eventId">Id of the event.</param>
142142
<param name="state">The entry to be written. Can also be an object.</param>
143143
<param name="exception">The exception related to this entry.</param>
144-
<param name="formatter">Function to create a <see cref="T:System.String" /> message of the <paramref name="state" /> and <paramref name="exception" />.</param>
144+
<param name="formatter">Function to create a <see cref="T:System.String" /> message of the <paramref name="state" /> and <paramref name="exception" />. **Note: When using extension methods such as <see cref="M:Microsoft.Extensions.Logging.LoggerExtensions.Log(Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Logging.LogLevel,Microsoft.Extensions.Logging.EventId,System.Exception,System.String,System.Object[])"/> and <see cref="M:Microsoft.Extensions.Logging.LoggerExtensions.LogError(Microsoft.Extensions.Logging.ILogger,System.Exception,System.String,System.Object[])"/>, the function passed here will not add the <paramref name="exception"/> parameter to the log message. When using these overloads, implementations should explicitly append the <paramref name="exception"/> to the log message.**</param>
145145
<summary>Writes a log entry.</summary>
146146
<remarks>To be added.</remarks>
147147
</Docs>

0 commit comments

Comments
 (0)