[csharp]
using System;
using System
using System
using System
using log
using log
using log
using log
namespace MyLog
{
public class MyLog
{
public static ILog GetMyLog(dynamic LogName)
{
ILog log = null;
if (LogName is string)
{
string name = (string)LogName;
log = log
}
else if (LogName is Type)
{
Type t = (Type)LogName;
log = log
}
else
{
throw new Exception(
}
FileAppender fa = new FileAppender()
fa
fa
fa
ConsoleAppender ca = new ConsoleAppender()
ca
PatternLayout pl = new PatternLayout()
pl
pl
fa
fa
ca
ca
Hierarchy h = (Hierarchy)LogManager
h
h
h
h
return log;
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/13319.html