41 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using log4net;
using System;
namespace Learun.Loger
{
/// <summary>
/// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
/// Copyright (c) 2013-2018 Hexagon PPM
/// 创建人:研发部
/// 日 期2017.03.04
/// 描 述redis操作方法
/// </summary>
public class LogFactory
{
/// <summary>
/// 构造函数
/// </summary>
static LogFactory()
{
log4net.Config.XmlConfigurator.Configure();
}
/// <summary>
/// 获取日志操作对象
/// </summary>
/// <param name="type">类型</param>
/// <returns></returns>
public static Log GetLogger(Type type)
{
return new Log(LogManager.GetLogger(type));
}
/// <summary>
/// 获取日志操作对象
/// </summary>
/// <param name="str">名字</param>
/// <returns></returns>
public static Log GetLogger(string str)
{
return new Log(LogManager.GetLogger(str));
}
}
}