|
我喜欢这样写,能提高点效率。
public void LogTrace(string msg)
{
if (logLevel <= LOG_LEVEL.TRACE)
{
Log("TRACE", msg);
}
}
public void LogTrace(string format, Object[] args)
{
if (logLevel <= LOG_LEVEL.TRACE)
{
Log("TRACE", String.Format(format, args));
}
}
public void LogTrace(string format, Object arg0)
{
if (logLevel <= LOG_LEVEL.TRACE)
{
Log("TRACE", String.Format(format, arg0));
}
}
public void LogTrace(string format, Object arg0, Object arg1)
{
if (logLevel <= LOG_LEVEL.TRACE)
{
Log("TRACE", String.Format(format, arg0, arg1));
}
}
public void LogTrace(string format, Object arg0, Object arg1, Object arg2)
{
if (logLevel <= LOG_LEVEL.TRACE)
{
Log("TRACE", String.Format(format, arg0, arg1, arg2));
}
} |
|