using System; namespace UnityEngine { // Token: 0x020004C6 RID: 1222 public class Logger : ILogger, ILogHandler { // Token: 0x06003B9C RID: 15260 RVA: 0x00068988 File Offset: 0x00066B88 private Logger() { } // Token: 0x06003B9D RID: 15261 RVA: 0x00068994 File Offset: 0x00066B94 public Logger(ILogHandler logHandler) { this.logHandler = logHandler; this.logEnabled = true; this.filterLogType = LogType.Log; } // Token: 0x17000D82 RID: 3458 // (get) Token: 0x06003B9E RID: 15262 RVA: 0x000689B4 File Offset: 0x00066BB4 // (set) Token: 0x06003B9F RID: 15263 RVA: 0x000689D0 File Offset: 0x00066BD0 public ILogHandler logHandler { get; set; } // Token: 0x17000D83 RID: 3459 // (get) Token: 0x06003BA0 RID: 15264 RVA: 0x000689DC File Offset: 0x00066BDC // (set) Token: 0x06003BA1 RID: 15265 RVA: 0x000689F8 File Offset: 0x00066BF8 public bool logEnabled { get; set; } // Token: 0x17000D84 RID: 3460 // (get) Token: 0x06003BA2 RID: 15266 RVA: 0x00068A04 File Offset: 0x00066C04 // (set) Token: 0x06003BA3 RID: 15267 RVA: 0x00068A20 File Offset: 0x00066C20 public LogType filterLogType { get; set; } // Token: 0x06003BA4 RID: 15268 RVA: 0x00068A2C File Offset: 0x00066C2C public bool IsLogTypeAllowed(LogType logType) { if (this.logEnabled) { if (logType == LogType.Exception) { return true; } if (this.filterLogType != LogType.Exception) { return logType <= this.filterLogType; } } return false; } // Token: 0x06003BA5 RID: 15269 RVA: 0x00068A7C File Offset: 0x00066C7C private static string GetString(object message) { return (message == null) ? "Null" : message.ToString(); } // Token: 0x06003BA6 RID: 15270 RVA: 0x00068AA8 File Offset: 0x00066CA8 public void Log(LogType logType, object message) { if (this.IsLogTypeAllowed(logType)) { this.logHandler.LogFormat(logType, null, "{0}", new object[] { Logger.GetString(message) }); } } // Token: 0x06003BA7 RID: 15271 RVA: 0x00068AD8 File Offset: 0x00066CD8 public void Log(LogType logType, object message, Object context) { if (this.IsLogTypeAllowed(logType)) { this.logHandler.LogFormat(logType, context, "{0}", new object[] { Logger.GetString(message) }); } } // Token: 0x06003BA8 RID: 15272 RVA: 0x00068B08 File Offset: 0x00066D08 public void Log(LogType logType, string tag, object message) { if (this.IsLogTypeAllowed(logType)) { this.logHandler.LogFormat(logType, null, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BA9 RID: 15273 RVA: 0x00068B3C File Offset: 0x00066D3C public void Log(LogType logType, string tag, object message, Object context) { if (this.IsLogTypeAllowed(logType)) { this.logHandler.LogFormat(logType, context, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BAA RID: 15274 RVA: 0x00068B74 File Offset: 0x00066D74 public void Log(object message) { if (this.IsLogTypeAllowed(LogType.Log)) { this.logHandler.LogFormat(LogType.Log, null, "{0}", new object[] { Logger.GetString(message) }); } } // Token: 0x06003BAB RID: 15275 RVA: 0x00068BA4 File Offset: 0x00066DA4 public void Log(string tag, object message) { if (this.IsLogTypeAllowed(LogType.Log)) { this.logHandler.LogFormat(LogType.Log, null, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BAC RID: 15276 RVA: 0x00068BD8 File Offset: 0x00066DD8 public void Log(string tag, object message, Object context) { if (this.IsLogTypeAllowed(LogType.Log)) { this.logHandler.LogFormat(LogType.Log, context, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BAD RID: 15277 RVA: 0x00068C0C File Offset: 0x00066E0C public void LogWarning(string tag, object message) { if (this.IsLogTypeAllowed(LogType.Warning)) { this.logHandler.LogFormat(LogType.Warning, null, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BAE RID: 15278 RVA: 0x00068C40 File Offset: 0x00066E40 public void LogWarning(string tag, object message, Object context) { if (this.IsLogTypeAllowed(LogType.Warning)) { this.logHandler.LogFormat(LogType.Warning, context, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BAF RID: 15279 RVA: 0x00068C74 File Offset: 0x00066E74 public void LogError(string tag, object message) { if (this.IsLogTypeAllowed(LogType.Error)) { this.logHandler.LogFormat(LogType.Error, null, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BB0 RID: 15280 RVA: 0x00068CA8 File Offset: 0x00066EA8 public void LogError(string tag, object message, Object context) { if (this.IsLogTypeAllowed(LogType.Error)) { this.logHandler.LogFormat(LogType.Error, context, "{0}: {1}", new object[] { tag, Logger.GetString(message) }); } } // Token: 0x06003BB1 RID: 15281 RVA: 0x00068CDC File Offset: 0x00066EDC public void LogFormat(LogType logType, string format, params object[] args) { if (this.IsLogTypeAllowed(logType)) { this.logHandler.LogFormat(logType, null, format, args); } } // Token: 0x06003BB2 RID: 15282 RVA: 0x00068CFC File Offset: 0x00066EFC public void LogException(Exception exception) { if (this.logEnabled) { this.logHandler.LogException(exception, null); } } // Token: 0x06003BB3 RID: 15283 RVA: 0x00068D18 File Offset: 0x00066F18 public void LogFormat(LogType logType, Object context, string format, params object[] args) { if (this.IsLogTypeAllowed(logType)) { this.logHandler.LogFormat(logType, context, format, args); } } // Token: 0x06003BB4 RID: 15284 RVA: 0x00068D38 File Offset: 0x00066F38 public void LogException(Exception exception, Object context) { if (this.logEnabled) { this.logHandler.LogException(exception, context); } } // Token: 0x040011EA RID: 4586 private const string kNoTagFormat = "{0}"; // Token: 0x040011EB RID: 4587 private const string kTagFormat = "{0}: {1}"; } }