| | 1 | | using UnityEngine; |
| | 2 | |
|
| | 3 | | namespace DCL |
| | 4 | | { |
| | 5 | | public class Logger |
| | 6 | | { |
| 0 | 7 | | public readonly ILogger unityLogger = Debug.unityLogger; |
| | 8 | | public bool verboseEnabled = false; |
| | 9 | |
|
| | 10 | | private string tag; |
| | 11 | |
|
| 0 | 12 | | public Logger(string tag) { this.tag = tag; } |
| | 13 | |
|
| | 14 | | public void Verbose(string message, Object context = null) |
| | 15 | | { |
| 0 | 16 | | if (!verboseEnabled) |
| 0 | 17 | | return; |
| | 18 | |
|
| 0 | 19 | | unityLogger.Log(LogType.Log, tag, message, context); |
| 0 | 20 | | } |
| | 21 | |
|
| 0 | 22 | | public void Info(string message, Object context = null) { unityLogger.Log(LogType.Log, tag, message, context); } |
| | 23 | |
|
| 0 | 24 | | public void Error(string message, Object context = null) { unityLogger.Log(LogType.Error, tag, message, context) |
| | 25 | |
|
| 0 | 26 | | public void Warning(string message, Object context = null) { unityLogger.Log(LogType.Warning, tag, message, cont |
| | 27 | |
|
| 0 | 28 | | public void Exception(string message, Object context = null) { unityLogger.Log(LogType.Exception, tag, message, |
| | 29 | | } |
| | 30 | | } |