z8018
2026-02-11 b8fb68b44c29e4667f6ea5746119413809a60a9e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
 
namespace KH.WMS.Core.Attributes
{
    /// <summary>
    /// 日志拦截器特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
    public class LogInterceptorAttribute : Attribute
    {
        /// <summary>
        /// 是否记录参数
        /// </summary>
        public bool LogParameters { get; set; } = true;
 
        /// <summary>
        /// 是否记录返回值
        /// </summary>
        public bool LogReturnValue { get; set; } = false;
 
        /// <summary>
        /// 是否记录执行时间
        /// </summary>
        public bool LogExecutionTime { get; set; } = true;
 
        /// <summary>
        /// 日志级别
        /// </summary>
        public LogLevel LogLevel { get; set; } = LogLevel.Information;
    }
 
}