示例#1
0
 /// <summary>
 /// 初始化一个<see cref="Log"/>类型的实例
 /// </summary>
 /// <param name="providerFactory">日志提供程序工厂</param>
 /// <param name="context">日志上下文</param>
 /// <param name="format">日志格式器</param>
 /// <param name="currentUser">当前用户</param>
 public Log(
     ILogProviderFactory providerFactory,
     ILogContext context,
     ILogFormat format,
     ICurrentUser currentUser)
     : base(providerFactory.Create("", format), context, currentUser)
 {
 }
示例#2
0
 /// <summary>
 /// 初始化日志操作
 /// </summary>
 /// <param name="providerFactory">日志提供程序工厂</param>
 /// <param name="context">日志上下文</param>
 /// <param name="format">日志格式器</param>
 /// <param name="session">用户会话</param>
 public Log(ILogProviderFactory providerFactory, ILogContext context, ILogFormat format, ISession session) : base(providerFactory.Create("", format), context, session)
 {
 }
示例#3
0
 /// <summary>
 /// 初始化一个<see cref="Log"/>类型的实例
 /// </summary>
 /// <param name="providerFactory">日志提供程序工厂</param>
 /// <param name="context">日志上下文</param>
 /// <param name="format">日志格式器</param>
 /// <param name="userContext">用户上下文</param>
 public Log(ILogProviderFactory providerFactory, ILogContext context, ILogFormat format, IUserContext userContext)
     : base(providerFactory.Create("", format), context, userContext)
 {
 }
示例#4
0
        public static ILog GetLog(string name = "NLog")
        {
            ILogProviderFactory service = Ioc.Container.GetService(typeof(ILogProviderFactory)) as ILogProviderFactory;

            return(new Log(service.Create(name)));
        }
示例#5
0
 /// <summary>
 /// 初始化日志操作
 /// </summary>
 /// <param name="providerFactory">日志提供程序工厂</param>
 /// <param name="context">日志上下文</param>
 /// <param name="format">日志格式器</param>
 /// <param name="session">用户会话</param>
 public NLogger(ILogProviderFactory providerFactory, ILogContext context, ILogFormat format) : base(providerFactory.Create("", format), context)
 {
 }