-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathUnityLogger.cs
40 lines (35 loc) · 1007 Bytes
/
UnityLogger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using RSG.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace RSG
{
/// <summary>
/// A logger implementation that logs to the Unity log.
/// </summary>
public class UnityLogger : Utils.ILogger
{
public void LogError(Exception ex, string message, params object[] args)
{
Debug.LogError(message + "\r\nException:\r\n" + ex.ToString());
}
public void LogError(string message, params object[] args)
{
Debug.LogError(message);
}
public void LogInfo(string message, params object[] args)
{
Debug.Log(message);
}
public void LogVerbose(string message, params object[] args)
{
Debug.Log(message);
}
public void LogWarning(string message, params object[] args)
{
Debug.LogWarning(message);
}
}
}