初始化

This commit is contained in:
2025-11-25 17:41:24 +08:00
commit 4cdf0f0f85
3383 changed files with 1050962 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Face.Log4Net
{
public class Log4NetHelper
{
public static void Log(string logMessage)
{
var log = LoggerFactory.CreateInstance(Log4NetType.Info.ToString());
if (log.IsInfoEnabled)
{
log.Info(logMessage);
}
}
public static void Debug(string logMessage)
{
var log = LoggerFactory.CreateInstance(Log4NetType.Info.ToString());
if (log.IsInfoEnabled)
{
log.Info(logMessage);
}
}
public static void Debug(string logMessage, Exception ex)
{
var log = LoggerFactory.CreateInstance(Log4NetType.Info.ToString());
if (log.IsInfoEnabled)
{
log.Error(logMessage, ex);
}
}
public static void Log(string logMessage, Exception ex)
{
var log = LoggerFactory.CreateInstance(Log4NetType.Info.ToString());
if (log.IsInfoEnabled)
{
log.Error(logMessage, ex);
}
}
}
}