Skip to content

Commit

Permalink
Docs for preferring RenderLogEvent on Target (#4947)
Browse files Browse the repository at this point in the history
Co-authored-by: Julian Verdurmen <304NotModified@users.noreply.github.com>
  • Loading branch information
304NotModified and 304NotModified committed Jun 27, 2022
1 parent c0948dd commit cb1df12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NLog/Layouts/Layout.cs
Expand Up @@ -41,6 +41,7 @@ namespace NLog.Layouts
using NLog.Config;
using NLog.Internal;
using NLog.Common;
using NLog.Targets;
using JetBrains.Annotations;

/// <summary>
Expand Down Expand Up @@ -189,6 +190,7 @@ public virtual void Precalculate(LogEventInfo logEvent)
/// <summary>
/// Renders formatted output using the log event as context.
/// </summary>
/// <remarks>Inside a <see cref="Target"/>, <see cref="Target.RenderLogEvent"/> is preferred for performance reasons.</remarks>
/// <param name="logEvent">The logging event.</param>
/// <returns>The formatted output as string.</returns>
public string Render(LogEventInfo logEvent)
Expand Down
2 changes: 2 additions & 0 deletions src/NLog/Layouts/Typed/LayoutTypedExtensions.cs
Expand Up @@ -33,6 +33,7 @@

using JetBrains.Annotations;
using NLog.Layouts;
using NLog.Targets;

namespace NLog
{
Expand All @@ -44,6 +45,7 @@ public static class LayoutTypedExtensions
/// <summary>
/// Renders the logevent into a result-value by using the provided layout
/// </summary>
/// <remarks>Inside a <see cref="Target"/>, <see cref="Target.RenderLogEvent"/> is preferred for performance reasons.</remarks>
/// <typeparam name="T"></typeparam>
/// <param name="layout">The layout.</param>
/// <param name="logEvent">The logevent info.</param>
Expand Down

0 comments on commit cb1df12

Please sign in to comment.