| 1 | using UnityEngine; |
| 2 | |
| 3 | namespace Oculus.Avatar |
| 4 | { |
| 5 | public static class AvatarLogger |
| 6 | { |
| 7 | public const string LogAvatar = "[Avatars] - "; |
| 8 | public const string Tab = " "; |
| 9 | |
| 10 | [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), |
| 11 | System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_BASIC")] |
| 12 | public static void Log(string logMsg) |
| 13 | { |
| 14 | Debug.Log(LogAvatar + logMsg); |
| 15 | } |
| 16 | |
| 17 | [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), |
| 18 | System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_BASIC")] |
| 19 | public static void Log(string logMsg, Object context) |
| 20 | { |
| 21 | Debug.Log(LogAvatar + logMsg , context); |
| 22 | } |
| 23 | |
| 24 | [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), |
| 25 | System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_WARNING")] |
| 26 | public static void LogWarning(string logMsg) |
| 27 | { |
| 28 | Debug.LogWarning(LogAvatar + logMsg); |
| 29 | } |
| 30 | |
| 31 | [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), |
| 32 | System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_ERROR")] |
| 33 | public static void LogError(string logMsg) |
| 34 | { |
| 35 | Debug.LogError(LogAvatar + logMsg); |
| 36 | } |
| 37 | |
| 38 | [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), |
| 39 | System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_ERROR")] |
| 40 | public static void LogError(string logMsg, Object context) |
| 41 | { |
| 42 | Debug.LogError(LogAvatar + logMsg, context); |
| 43 | } |
| 44 | }; |
| 45 | } |