Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Logger.Extensions.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 //
4 // File AUTO-GENERATED, do not edit!
5 using System;
6 
7 namespace SiliconStudio.Core.Diagnostics
8 {
9  public abstract partial class Logger
10  {
11  /// <summary>
12  /// Logs the specified verbose message with an exception.
13  /// </summary>
14  /// <param name="message">The verbose message.</param>
15  /// <param name="exception">An exception to log with the message.</param>
16  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
17  public void Verbose(string message, Exception exception, CallerInfo callerInfo = null)
18  {
19  Log(new LogMessage(Module, LogMessageType.Verbose, message, exception, callerInfo));
20  }
21 
22  /// <summary>
23  /// Logs the specified verbose message.
24  /// </summary>
25  /// <param name="message">The verbose message.</param>
26  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
27  public void Verbose(string message, CallerInfo callerInfo = null)
28  {
29  Verbose(message, null, callerInfo);
30  }
31 
32  /// <summary>
33  /// Logs the specified verbose message.
34  /// </summary>
35  /// <param name="messageFormat">The verbose message to format.</param>
36  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
37  public void Verbose(string messageFormat, params object[] parameters)
38  {
39  Verbose(messageFormat, null, parameters);
40  }
41 
42  /// <summary>
43  /// Logs the specified verbose message with an exception.
44  /// </summary>
45  /// <param name="messageFormat">The verbose message to format.</param>
46  /// <param name="exception">An exception to log with the message.</param>
47  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
48  /// <exception cref="System.ArgumentNullException"></exception>
49  public void Verbose(string messageFormat, Exception exception, params object[] parameters)
50  {
51  if (parameters == null) throw new ArgumentNullException("parameters");
52  Verbose(string.Format(messageFormat, parameters), exception, ExtractCallerInfo(parameters));
53  }
54  /// <summary>
55  /// Logs the specified debug message with an exception.
56  /// </summary>
57  /// <param name="message">The debug message.</param>
58  /// <param name="exception">An exception to log with the message.</param>
59  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
60  public void Debug(string message, Exception exception, CallerInfo callerInfo = null)
61  {
62  Log(new LogMessage(Module, LogMessageType.Debug, message, exception, callerInfo));
63  }
64 
65  /// <summary>
66  /// Logs the specified debug message.
67  /// </summary>
68  /// <param name="message">The debug message.</param>
69  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
70  public void Debug(string message, CallerInfo callerInfo = null)
71  {
72  Debug(message, null, callerInfo);
73  }
74 
75  /// <summary>
76  /// Logs the specified debug message.
77  /// </summary>
78  /// <param name="messageFormat">The debug message to format.</param>
79  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
80  public void Debug(string messageFormat, params object[] parameters)
81  {
82  Debug(messageFormat, null, parameters);
83  }
84 
85  /// <summary>
86  /// Logs the specified debug message with an exception.
87  /// </summary>
88  /// <param name="messageFormat">The debug message to format.</param>
89  /// <param name="exception">An exception to log with the message.</param>
90  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
91  /// <exception cref="System.ArgumentNullException"></exception>
92  public void Debug(string messageFormat, Exception exception, params object[] parameters)
93  {
94  if (parameters == null) throw new ArgumentNullException("parameters");
95  Debug(string.Format(messageFormat, parameters), exception, ExtractCallerInfo(parameters));
96  }
97  /// <summary>
98  /// Logs the specified info message with an exception.
99  /// </summary>
100  /// <param name="message">The info message.</param>
101  /// <param name="exception">An exception to log with the message.</param>
102  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
103  public void Info(string message, Exception exception, CallerInfo callerInfo = null)
104  {
105  Log(new LogMessage(Module, LogMessageType.Info, message, exception, callerInfo));
106  }
107 
108  /// <summary>
109  /// Logs the specified info message.
110  /// </summary>
111  /// <param name="message">The info message.</param>
112  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
113  public void Info(string message, CallerInfo callerInfo = null)
114  {
115  Info(message, null, callerInfo);
116  }
117 
118  /// <summary>
119  /// Logs the specified info message.
120  /// </summary>
121  /// <param name="messageFormat">The info message to format.</param>
122  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
123  public void Info(string messageFormat, params object[] parameters)
124  {
125  Info(messageFormat, null, parameters);
126  }
127 
128  /// <summary>
129  /// Logs the specified info message with an exception.
130  /// </summary>
131  /// <param name="messageFormat">The info message to format.</param>
132  /// <param name="exception">An exception to log with the message.</param>
133  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
134  /// <exception cref="System.ArgumentNullException"></exception>
135  public void Info(string messageFormat, Exception exception, params object[] parameters)
136  {
137  if (parameters == null) throw new ArgumentNullException("parameters");
138  Info(string.Format(messageFormat, parameters), exception, ExtractCallerInfo(parameters));
139  }
140  /// <summary>
141  /// Logs the specified warning message with an exception.
142  /// </summary>
143  /// <param name="message">The warning message.</param>
144  /// <param name="exception">An exception to log with the message.</param>
145  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
146  public void Warning(string message, Exception exception, CallerInfo callerInfo = null)
147  {
148  Log(new LogMessage(Module, LogMessageType.Warning, message, exception, callerInfo));
149  }
150 
151  /// <summary>
152  /// Logs the specified warning message.
153  /// </summary>
154  /// <param name="message">The warning message.</param>
155  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
156  public void Warning(string message, CallerInfo callerInfo = null)
157  {
158  Warning(message, null, callerInfo);
159  }
160 
161  /// <summary>
162  /// Logs the specified warning message.
163  /// </summary>
164  /// <param name="messageFormat">The warning message to format.</param>
165  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
166  public void Warning(string messageFormat, params object[] parameters)
167  {
168  Warning(messageFormat, null, parameters);
169  }
170 
171  /// <summary>
172  /// Logs the specified warning message with an exception.
173  /// </summary>
174  /// <param name="messageFormat">The warning message to format.</param>
175  /// <param name="exception">An exception to log with the message.</param>
176  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
177  /// <exception cref="System.ArgumentNullException"></exception>
178  public void Warning(string messageFormat, Exception exception, params object[] parameters)
179  {
180  if (parameters == null) throw new ArgumentNullException("parameters");
181  Warning(string.Format(messageFormat, parameters), exception, ExtractCallerInfo(parameters));
182  }
183  /// <summary>
184  /// Logs the specified error message with an exception.
185  /// </summary>
186  /// <param name="message">The error message.</param>
187  /// <param name="exception">An exception to log with the message.</param>
188  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
189  public void Error(string message, Exception exception, CallerInfo callerInfo = null)
190  {
191  Log(new LogMessage(Module, LogMessageType.Error, message, exception, callerInfo));
192  }
193 
194  /// <summary>
195  /// Logs the specified error message.
196  /// </summary>
197  /// <param name="message">The error message.</param>
198  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
199  public void Error(string message, CallerInfo callerInfo = null)
200  {
201  Error(message, null, callerInfo);
202  }
203 
204  /// <summary>
205  /// Logs the specified error message.
206  /// </summary>
207  /// <param name="messageFormat">The error message to format.</param>
208  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
209  public void Error(string messageFormat, params object[] parameters)
210  {
211  Error(messageFormat, null, parameters);
212  }
213 
214  /// <summary>
215  /// Logs the specified error message with an exception.
216  /// </summary>
217  /// <param name="messageFormat">The error message to format.</param>
218  /// <param name="exception">An exception to log with the message.</param>
219  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
220  /// <exception cref="System.ArgumentNullException"></exception>
221  public void Error(string messageFormat, Exception exception, params object[] parameters)
222  {
223  if (parameters == null) throw new ArgumentNullException("parameters");
224  Error(string.Format(messageFormat, parameters), exception, ExtractCallerInfo(parameters));
225  }
226  /// <summary>
227  /// Logs the specified fatal message with an exception.
228  /// </summary>
229  /// <param name="message">The fatal message.</param>
230  /// <param name="exception">An exception to log with the message.</param>
231  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
232  public void Fatal(string message, Exception exception, CallerInfo callerInfo = null)
233  {
234  Log(new LogMessage(Module, LogMessageType.Fatal, message, exception, callerInfo));
235  }
236 
237  /// <summary>
238  /// Logs the specified fatal message.
239  /// </summary>
240  /// <param name="message">The fatal message.</param>
241  /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
242  public void Fatal(string message, CallerInfo callerInfo = null)
243  {
244  Fatal(message, null, callerInfo);
245  }
246 
247  /// <summary>
248  /// Logs the specified fatal message.
249  /// </summary>
250  /// <param name="messageFormat">The fatal message to format.</param>
251  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
252  public void Fatal(string messageFormat, params object[] parameters)
253  {
254  Fatal(messageFormat, null, parameters);
255  }
256 
257  /// <summary>
258  /// Logs the specified fatal message with an exception.
259  /// </summary>
260  /// <param name="messageFormat">The fatal message to format.</param>
261  /// <param name="exception">An exception to log with the message.</param>
262  /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
263  /// <exception cref="System.ArgumentNullException"></exception>
264  public void Fatal(string messageFormat, Exception exception, params object[] parameters)
265  {
266  if (parameters == null) throw new ArgumentNullException("parameters");
267  Fatal(string.Format(messageFormat, parameters), exception, ExtractCallerInfo(parameters));
268  }
269  }
270 }
void Info(string messageFormat, Exception exception, params object[] parameters)
Logs the specified info message with an exception.
void Verbose(string messageFormat, params object[] parameters)
Logs the specified verbose message.
void Info(string message, Exception exception, CallerInfo callerInfo=null)
Logs the specified info message with an exception.
void Info(string messageFormat, params object[] parameters)
Logs the specified info message.
void Fatal(string message, CallerInfo callerInfo=null)
Logs the specified fatal message.
void Verbose(string message, CallerInfo callerInfo=null)
Logs the specified verbose message.
void Info(string message, CallerInfo callerInfo=null)
Logs the specified info message.
void Verbose(string messageFormat, Exception exception, params object[] parameters)
Logs the specified verbose message with an exception.
void Warning(string message, CallerInfo callerInfo=null)
Logs the specified warning message.
void Error(string messageFormat, params object[] parameters)
Logs the specified error message.
A Fatal error message (level 5).
A class to store Caller Information attributes.
Definition: CallerInfo.cs:10
void Error(string messageFormat, Exception exception, params object[] parameters)
Logs the specified error message with an exception.
A debug message (level 0).
void Debug(string messageFormat, Exception exception, params object[] parameters)
Logs the specified debug message with an exception.
void Fatal(string messageFormat, Exception exception, params object[] parameters)
Logs the specified fatal message with an exception.
void Error(string message, CallerInfo callerInfo=null)
Logs the specified error message.
A verbose message (level 1).
void Debug(string message, CallerInfo callerInfo=null)
Logs the specified debug message.
void Debug(string messageFormat, params object[] parameters)
Logs the specified debug message.
void Error(string message, Exception exception, CallerInfo callerInfo=null)
Logs the specified error message with an exception.
void Warning(string messageFormat, params object[] parameters)
Logs the specified warning message.
LogMessageType
Type of a LogMessage.
void Warning(string messageFormat, Exception exception, params object[] parameters)
Logs the specified warning message with an exception.
An error message (level 4).
A base log message used by the logging infrastructure.
Definition: LogMessage.cs:13
void Fatal(string messageFormat, params object[] parameters)
Logs the specified fatal message.
void Fatal(string message, Exception exception, CallerInfo callerInfo=null)
Logs the specified fatal message with an exception.
An regular info message (level 2).
void Verbose(string message, Exception exception, CallerInfo callerInfo=null)
Logs the specified verbose message with an exception.
void Debug(string message, Exception exception, CallerInfo callerInfo=null)
Logs the specified debug message with an exception.
void Warning(string message, Exception exception, CallerInfo callerInfo=null)
Logs the specified warning message with an exception.
Output message to log right away.
A warning message (level 3).