mirror of https://github.com/abpframework/abp.git
1 changed files with 18 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||
using JetBrains.Annotations; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.Logging |
|||
{ |
|||
public static class HasLogLevelExtensions |
|||
{ |
|||
public static TException WithLogLevel<TException>([NotNull] this TException exception, LogLevel logLevel) |
|||
where TException : IHasLogLevel |
|||
{ |
|||
Check.NotNull(exception, nameof(exception)); |
|||
|
|||
exception.LogLevel = logLevel; |
|||
|
|||
return exception; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue