35 lines
795 B
C#
35 lines
795 B
C#
using BS.Shared.Logger;
|
|
using DevExpress.CodeParser.Diagnostics;
|
|
using log4net;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.Core
|
|
{
|
|
public static class ServiceLogger
|
|
{
|
|
public static FileLogger CoreLogger { get; } = new FileLogger(BeWoServerPathHelper.GetServiceLogFile());
|
|
|
|
public static FileLogger GetRequestLogger()
|
|
{
|
|
var filePath = BeWoServerPathHelper.GetUniqueRequestLogFile();
|
|
|
|
if (filePath == null)
|
|
throw new NotImplementedException("err98462");
|
|
|
|
return new FileLogger(filePath);
|
|
}
|
|
|
|
public static ILog GetLogger(Type declaringType)
|
|
{
|
|
log4net.Config.XmlConfigurator.Configure();
|
|
|
|
return log4net.LogManager.GetLogger(declaringType);
|
|
}
|
|
}
|
|
}
|