Skip to content

Commit

Permalink
Return the Log method for the skipEnabledCheck-branch directly
Browse files Browse the repository at this point in the history
So that it is (manually) inlined. Cf. #50334 (comment)
  • Loading branch information
gfoidl committed Mar 29, 2021
1 parent 778858a commit 3e547f1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void Log(ILogger logger, Exception? exception)

if (skipEnabledCheck)
{
return (logger, exception) => Log(logger, exception);
return Log;
}

return (logger, exception) =>
Expand Down Expand Up @@ -192,7 +192,7 @@ void Log(ILogger logger, T1 arg1, Exception? exception)

if (skipEnabledCheck)
{
return (logger, arg1, exception) => Log(logger, arg1, exception);
return Log;
}

return (logger, arg1, exception) =>
Expand Down Expand Up @@ -237,7 +237,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, Exception? exception)

if (skipEnabledCheck)
{
return (logger, arg1, arg2, exception) => Log(logger, arg1, arg2, exception);
return Log;
}

return (logger, arg1, arg2, exception) =>
Expand Down Expand Up @@ -284,7 +284,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, Exception? exception)

if (skipEnabledCheck)
{
return (logger, arg1, arg2, arg3, exception) => Log(logger, arg1, arg2, arg3, exception);
return Log;
}

return (logger, arg1, arg2, arg3, exception) =>
Expand Down Expand Up @@ -333,7 +333,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Exception? exceptio

if (skipEnabledCheck)
{
return (logger, arg1, arg2, arg3, arg4, exception) => Log(logger, arg1, arg2, arg3, arg4, exception);
return Log;
}

return (logger, arg1, arg2, arg3, arg4, exception) =>
Expand Down Expand Up @@ -384,7 +384,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Exception?

if (skipEnabledCheck)
{
return (logger, arg1, arg2, arg3, arg4, arg5, exception) => Log(logger, arg1, arg2, arg3, arg4, arg5, exception);
return Log;
}

return (logger, arg1, arg2, arg3, arg4, arg5, exception) =>
Expand Down Expand Up @@ -437,7 +437,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, E

if (skipEnabledCheck)
{
return (logger, arg1, arg2, arg3, arg4, arg5, arg6, exception) => Log(logger, arg1, arg2, arg3, arg4, arg5, arg6, exception);
return Log;
}

return (logger, arg1, arg2, arg3, arg4, arg5, arg6, exception) =>
Expand Down

0 comments on commit 3e547f1

Please sign in to comment.