12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Aitex.DataAnalysis.Log
- {
- public static class LOG
- {
- public static ICommonLog InnerLogger { set; private get; }
- public static void Info(string message, bool isTraceOn=false)
- {
- if (InnerLogger != null)
- InnerLogger.Info(message, isTraceOn);
- }
- public static void Warning(string message)
- {
- if (InnerLogger != null)
- InnerLogger.Warning(message);
- }
- public static void Warning(string message, params object[] args)
- {
- if (InnerLogger != null)
- InnerLogger.Warning(string.Format(message, args));
- }
- public static void Error(string message)
- {
- if (InnerLogger != null)
- InnerLogger.Error(message);
- }
- public static void Warning(string message, Exception ex)
- {
- if (InnerLogger != null)
- InnerLogger.Warning(message, ex);
- }
- public static void Error(string message, Exception ex)
- {
- if (InnerLogger != null)
- InnerLogger.Error(message, ex);
- }
- public static void Write(Exception ex)
- {
- Error("", ex);
- }
- public static void Write(Exception ex, string message)
- {
- Error(message, ex);
- }
- public static void Write(string message)
- {
- Info(message);
- }
- }
- }
|