1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Aitex.Core.RT.Log;
- namespace Aitex.Core.RT.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);
- }
- }
- }
|