@@ -6,7 +6,7 @@ namespace Zigurous.DebugTools
6
6
/// Provides more robust console logging functions compared to
7
7
/// UnityEngine.Debug.
8
8
/// </summary>
9
- public static class Debug
9
+ public static class Log
10
10
{
11
11
/// <summary>
12
12
/// A prefix appended to every log message printed to the console.
@@ -35,13 +35,13 @@ public static class Debug
35
35
/// <summary>
36
36
/// Logs a message to the Unity console.
37
37
/// </summary>
38
- public static void Log ( object message )
38
+ public static void Message ( object message )
39
39
{
40
40
#if UNITY_EDITOR || DEVELOPMENT_BUILD
41
41
if ( message != null ) {
42
- UnityEngine . Debug . Log ( stringBuilder . Append ( Debug . prefix ) . Append ( message ) ) ;
42
+ UnityEngine . Debug . Log ( stringBuilder . Append ( Log . prefix ) . Append ( message ) ) ;
43
43
} else {
44
- UnityEngine . Debug . Log ( stringBuilder . Append ( Debug . prefix ) . Append ( Debug . nullReference ) ) ;
44
+ UnityEngine . Debug . Log ( stringBuilder . Append ( Log . prefix ) . Append ( Log . nullReference ) ) ;
45
45
}
46
46
stringBuilder . Clear ( ) ;
47
47
#endif
@@ -50,13 +50,13 @@ public static void Log(object message)
50
50
/// <summary>
51
51
/// Logs a message to the Unity console under a given context.
52
52
/// </summary>
53
- public static void Log ( object message , UnityEngine . Object context )
53
+ public static void Message ( object message , UnityEngine . Object context )
54
54
{
55
55
#if UNITY_EDITOR || DEVELOPMENT_BUILD
56
56
if ( message != null ) {
57
- UnityEngine . Debug . Log ( stringBuilder . Append ( Debug . prefix ) . Append ( message ) , context ) ;
57
+ UnityEngine . Debug . Log ( stringBuilder . Append ( Log . prefix ) . Append ( message ) , context ) ;
58
58
} else {
59
- UnityEngine . Debug . Log ( stringBuilder . Append ( Debug . prefix ) . Append ( Debug . nullReference ) , context ) ;
59
+ UnityEngine . Debug . Log ( stringBuilder . Append ( Log . prefix ) . Append ( Log . nullReference ) , context ) ;
60
60
}
61
61
stringBuilder . Clear ( ) ;
62
62
#endif
@@ -65,10 +65,10 @@ public static void Log(object message, UnityEngine.Object context)
65
65
/// <summary>
66
66
/// Logs multiple messages as a single statement to the Unity console.
67
67
/// </summary>
68
- public static void Log ( params object [ ] messages )
68
+ public static void Message ( params object [ ] messages )
69
69
{
70
70
#if UNITY_EDITOR || DEVELOPMENT_BUILD
71
- stringBuilder . Append ( Debug . prefix ) ;
71
+ stringBuilder . Append ( Log . prefix ) ;
72
72
Join ( messages ) ;
73
73
UnityEngine . Debug . Log ( stringBuilder ) ;
74
74
stringBuilder . Clear ( ) ;
@@ -78,13 +78,13 @@ public static void Log(params object[] messages)
78
78
/// <summary>
79
79
/// Logs a warning message to the Unity console.
80
80
/// </summary>
81
- public static void LogWarning ( object message )
81
+ public static void Warning ( object message )
82
82
{
83
83
#if UNITY_EDITOR || DEVELOPMENT_BUILD
84
84
if ( message != null ) {
85
- UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Debug . prefix ) . Append ( message ) ) ;
85
+ UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Log . prefix ) . Append ( message ) ) ;
86
86
} else {
87
- UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Debug . prefix ) . Append ( Debug . nullReference ) ) ;
87
+ UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Log . prefix ) . Append ( Log . nullReference ) ) ;
88
88
}
89
89
stringBuilder . Clear ( ) ;
90
90
#endif
@@ -93,13 +93,13 @@ public static void LogWarning(object message)
93
93
/// <summary>
94
94
/// Logs a warning message to the Unity console under a given context.
95
95
/// </summary>
96
- public static void LogWarning ( object message , UnityEngine . Object context )
96
+ public static void Warning ( object message , UnityEngine . Object context )
97
97
{
98
98
#if UNITY_EDITOR || DEVELOPMENT_BUILD
99
99
if ( message != null ) {
100
- UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Debug . prefix ) . Append ( message ) , context ) ;
100
+ UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Log . prefix ) . Append ( message ) , context ) ;
101
101
} else {
102
- UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Debug . prefix ) . Append ( Debug . nullReference ) , context ) ;
102
+ UnityEngine . Debug . LogWarning ( stringBuilder . Append ( Log . prefix ) . Append ( Log . nullReference ) , context ) ;
103
103
}
104
104
stringBuilder . Clear ( ) ;
105
105
#endif
@@ -109,10 +109,10 @@ public static void LogWarning(object message, UnityEngine.Object context)
109
109
/// Logs multiple warning messages as a single statement to the Unity
110
110
/// console.
111
111
/// </summary>
112
- public static void LogWarning ( params object [ ] messages )
112
+ public static void Warning ( params object [ ] messages )
113
113
{
114
114
#if UNITY_EDITOR || DEVELOPMENT_BUILD
115
- stringBuilder . Append ( Debug . prefix ) ;
115
+ stringBuilder . Append ( Log . prefix ) ;
116
116
Join ( messages ) ;
117
117
UnityEngine . Debug . LogWarning ( stringBuilder ) ;
118
118
stringBuilder . Clear ( ) ;
@@ -122,13 +122,13 @@ public static void LogWarning(params object[] messages)
122
122
/// <summary>
123
123
/// Logs an error message to the Unity console.
124
124
/// </summary>
125
- public static void LogError ( object message )
125
+ public static void Error ( object message )
126
126
{
127
127
#if UNITY_EDITOR || DEVELOPMENT_BUILD
128
128
if ( message != null ) {
129
- UnityEngine . Debug . LogError ( stringBuilder . Append ( Debug . prefix ) . Append ( message ) ) ;
129
+ UnityEngine . Debug . LogError ( stringBuilder . Append ( Log . prefix ) . Append ( message ) ) ;
130
130
} else {
131
- UnityEngine . Debug . LogError ( stringBuilder . Append ( Debug . prefix ) . Append ( Debug . nullReference ) ) ;
131
+ UnityEngine . Debug . LogError ( stringBuilder . Append ( Log . prefix ) . Append ( Log . nullReference ) ) ;
132
132
}
133
133
stringBuilder . Clear ( ) ;
134
134
#endif
@@ -137,13 +137,13 @@ public static void LogError(object message)
137
137
/// <summary>
138
138
/// Logs an error message to the Unity console under a given context.
139
139
/// </summary>
140
- public static void LogError ( object message , UnityEngine . Object context )
140
+ public static void Error ( object message , UnityEngine . Object context )
141
141
{
142
142
#if UNITY_EDITOR || DEVELOPMENT_BUILD
143
143
if ( message != null ) {
144
- UnityEngine . Debug . LogError ( stringBuilder . Append ( Debug . prefix ) . Append ( message ) , context ) ;
144
+ UnityEngine . Debug . LogError ( stringBuilder . Append ( Log . prefix ) . Append ( message ) , context ) ;
145
145
} else {
146
- UnityEngine . Debug . LogError ( stringBuilder . Append ( Debug . prefix ) . Append ( Debug . nullReference ) , context ) ;
146
+ UnityEngine . Debug . LogError ( stringBuilder . Append ( Log . prefix ) . Append ( Log . nullReference ) , context ) ;
147
147
}
148
148
stringBuilder . Clear ( ) ;
149
149
#endif
@@ -153,10 +153,10 @@ public static void LogError(object message, UnityEngine.Object context)
153
153
/// Logs multiple error messages as a single statement to the Unity
154
154
/// console.
155
155
/// </summary>
156
- public static void LogError ( params object [ ] messages )
156
+ public static void Error ( params object [ ] messages )
157
157
{
158
158
#if UNITY_EDITOR || DEVELOPMENT_BUILD
159
- stringBuilder . Append ( Debug . prefix ) ;
159
+ stringBuilder . Append ( Log . prefix ) ;
160
160
Join ( messages ) ;
161
161
UnityEngine . Debug . LogError ( stringBuilder ) ;
162
162
stringBuilder . Clear ( ) ;
@@ -171,7 +171,7 @@ private static void Join(object[] messages)
171
171
#if UNITY_EDITOR || DEVELOPMENT_BUILD
172
172
if ( messages == null )
173
173
{
174
- stringBuilder . Append ( Debug . nullReference ) ;
174
+ stringBuilder . Append ( Log . nullReference ) ;
175
175
return ;
176
176
}
177
177
@@ -180,9 +180,9 @@ private static void Join(object[] messages)
180
180
object message = messages [ i ] ;
181
181
182
182
if ( message != null ) {
183
- stringBuilder . Append ( message ) . Append ( Debug . delimiter ) ;
183
+ stringBuilder . Append ( message ) . Append ( Log . delimiter ) ;
184
184
} else {
185
- stringBuilder . Append ( Debug . nullReference ) . Append ( Debug . delimiter ) ;
185
+ stringBuilder . Append ( Log . nullReference ) . Append ( Log . delimiter ) ;
186
186
}
187
187
}
188
188
@@ -193,7 +193,7 @@ private static void Join(object[] messages)
193
193
if ( lastMessage != null ) {
194
194
stringBuilder . Append ( lastMessage ) ;
195
195
} else {
196
- stringBuilder . Append ( Debug . nullReference ) ;
196
+ stringBuilder . Append ( Log . nullReference ) ;
197
197
}
198
198
}
199
199
#endif
0 commit comments