Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent Exception handling v3 #1143

Merged
merged 44 commits into from
Jan 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9a5bb72
added Exception overloads
304NotModified Jan 8, 2016
800f966
Fixed inconistent usage of [Localizable(false)]
304NotModified Jan 8, 2016
e03e7a8
move exception to separate parameter
304NotModified Jan 8, 2016
054a39f
Added MustBeRethrownImmediately, log in MustBeRethrown
304NotModified Jan 8, 2016
168b4d3
mark exception as logged to InternalLogger, log only once
304NotModified Jan 8, 2016
d5da1e1
handle MustBeRethrownImmediately exceptions
304NotModified Jan 8, 2016
e4866d5
docs
304NotModified Jan 8, 2016
228d34a
move writing to InternalLogger before MustBeRethrown
304NotModified Jan 8, 2016
f008460
null check
304NotModified Jan 8, 2016
718de76
space added
304NotModified Jan 8, 2016
d0d7b3b
fix test
304NotModified Jan 8, 2016
86e3101
Merge branch 'master' into excception-handling-v3
304NotModified Jan 8, 2016
8d5e0f5
fix merge
304NotModified Jan 8, 2016
4a502ce
doc
304NotModified Jan 8, 2016
8bb1d9a
Don't rethrow NLogConfigurationException Immediately
304NotModified Jan 8, 2016
b952449
Fixes after review
304NotModified Jan 10, 2016
863d516
Merge branch 'master' into excception-handling-v3
304NotModified Jan 10, 2016
d3a4f1f
Added space
304NotModified Jan 11, 2016
f2001bb
don't throw ex
304NotModified Jan 11, 2016
a6b87ec
rename method
304NotModified Jan 12, 2016
4ad24a6
added comments
304NotModified Jan 12, 2016
e4155c6
remove GetType().IsSubclassOf in favor of `is`
304NotModified Jan 12, 2016
7e6f021
Added unit tests
304NotModified Jan 12, 2016
ae28117
Sync projects
304NotModified Jan 12, 2016
e5d97e1
Skip tests for Silverlight
304NotModified Jan 12, 2016
541fd14
Added file header
304NotModified Jan 15, 2016
e38716e
remove test duplicates
304NotModified Jan 25, 2016
18696db
fix typo
304NotModified Jan 25, 2016
8d21c54
Fixes after code review
304NotModified Jan 25, 2016
6a448a5
Merge remote-tracking branch 'remotes/origin/master' into excception-…
304NotModified Jan 25, 2016
ce8d4d0
Fix exceptions (now wrapped)
304NotModified Jan 25, 2016
c57db42
Fixes for unit tests
304NotModified Jan 25, 2016
e09dcdc
improve xUnit usage
304NotModified Jan 25, 2016
d1b6547
Improve xUnit usage
304NotModified Jan 25, 2016
1e60215
Fix unit tests
304NotModified Jan 25, 2016
00d766d
Improve xUnit usage
304NotModified Jan 25, 2016
521322f
Merge branch 'master' into excception-handling-v3
304NotModified Jan 25, 2016
411f44d
Improve error handling for RegistryLayoutRenderer
304NotModified Jan 25, 2016
9457137
docs
304NotModified Jan 25, 2016
5a01548
Improvements in error logging
304NotModified Jan 25, 2016
d4f5ad3
fix .net 3.5
304NotModified Jan 25, 2016
3edfa50
Fix inconsistent exception
304NotModified Jan 25, 2016
47316e7
Fix unit test name => generalised testcase with [InlineData]
304NotModified Jan 27, 2016
c079af5
Silverlight compatible unit tests
304NotModified Jan 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 162 additions & 24 deletions src/NLog/Common/InternalLogger-generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,124 +90,262 @@ public static bool IsFatalEnabled


/// <summary>
/// Logs the specified message at the Trace level.
/// Logs the specified message without an <see cref="Exception"/> at the Trace level.
/// </summary>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Trace([Localizable(false)] string message, params object[] args)
{
Write(LogLevel.Trace, message, args);
Write(null, LogLevel.Trace, message, args);
}

/// <summary>
/// Logs the specified message at the Trace level.
/// Logs the specified message without an <see cref="Exception"/> at the Trace level.
/// </summary>
/// <param name="message">Log message.</param>
public static void Trace([Localizable(false)] string message)
{
Write(LogLevel.Trace, message, null);
Write(null, LogLevel.Trace, message, null);
}


/// <summary>
/// Logs the specified message at the Debug level.
/// Logs the specified message with an <see cref="Exception"/> at the Trace level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Trace(Exception ex, [Localizable(false)] string message, params object[] args)
{
Write(ex, LogLevel.Trace, message, args);
}

/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Trace level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Log message.</param>
public static void Trace(Exception ex, [Localizable(false)] string message)
{
Write(ex, LogLevel.Trace, message, null);
}

/// <summary>
/// Logs the specified message without an <see cref="Exception"/> at the Debug level.
/// </summary>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Debug([Localizable(false)] string message, params object[] args)
{
Write(LogLevel.Debug, message, args);
Write(null, LogLevel.Debug, message, args);
}

/// <summary>
/// Logs the specified message at the Debug level.
/// Logs the specified message without an <see cref="Exception"/> at the Debug level.
/// </summary>
/// <param name="message">Log message.</param>
public static void Debug([Localizable(false)] string message)
{
Write(LogLevel.Debug, message, null);
Write(null, LogLevel.Debug, message, null);
}


/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Debug level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Debug(Exception ex, [Localizable(false)] string message, params object[] args)
{
Write(ex, LogLevel.Debug, message, args);
}

/// <summary>
/// Logs the specified message at the Info level.
/// Logs the specified message with an <see cref="Exception"/> at the Debug level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Log message.</param>
public static void Debug(Exception ex, [Localizable(false)] string message)
{
Write(ex, LogLevel.Debug, message, null);
}

/// <summary>
/// Logs the specified message without an <see cref="Exception"/> at the Info level.
/// </summary>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Info([Localizable(false)] string message, params object[] args)
{
Write(LogLevel.Info, message, args);
Write(null, LogLevel.Info, message, args);
}

/// <summary>
/// Logs the specified message at the Info level.
/// Logs the specified message without an <see cref="Exception"/> at the Info level.
/// </summary>
/// <param name="message">Log message.</param>
public static void Info([Localizable(false)] string message)
{
Write(LogLevel.Info, message, null);
Write(null, LogLevel.Info, message, null);
}


/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Info level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Info(Exception ex, [Localizable(false)] string message, params object[] args)
{
Write(ex, LogLevel.Info, message, args);
}

/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Info level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Log message.</param>
public static void Info(Exception ex, [Localizable(false)] string message)
{
Write(ex, LogLevel.Info, message, null);
}

/// <summary>
/// Logs the specified message at the Warn level.
/// Logs the specified message without an <see cref="Exception"/> at the Warn level.
/// </summary>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Warn([Localizable(false)] string message, params object[] args)
{
Write(LogLevel.Warn, message, args);
Write(null, LogLevel.Warn, message, args);
}

/// <summary>
/// Logs the specified message at the Warn level.
/// Logs the specified message without an <see cref="Exception"/> at the Warn level.
/// </summary>
/// <param name="message">Log message.</param>
public static void Warn([Localizable(false)] string message)
{
Write(LogLevel.Warn, message, null);
Write(null, LogLevel.Warn, message, null);
}


/// <summary>
/// Logs the specified message at the Error level.
/// Logs the specified message with an <see cref="Exception"/> at the Warn level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Warn(Exception ex, [Localizable(false)] string message, params object[] args)
{
Write(ex, LogLevel.Warn, message, args);
}

/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Warn level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Log message.</param>
public static void Warn(Exception ex, [Localizable(false)] string message)
{
Write(ex, LogLevel.Warn, message, null);
}

/// <summary>
/// Logs the specified message without an <see cref="Exception"/> at the Error level.
/// </summary>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Error([Localizable(false)] string message, params object[] args)
{
Write(LogLevel.Error, message, args);
Write(null, LogLevel.Error, message, args);
}

/// <summary>
/// Logs the specified message at the Error level.
/// Logs the specified message without an <see cref="Exception"/> at the Error level.
/// </summary>
/// <param name="message">Log message.</param>
public static void Error([Localizable(false)] string message)
{
Write(LogLevel.Error, message, null);
Write(null, LogLevel.Error, message, null);
}


/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Error level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Error(Exception ex, [Localizable(false)] string message, params object[] args)
{
Write(ex, LogLevel.Error, message, args);
}

/// <summary>
/// Logs the specified message at the Fatal level.
/// Logs the specified message with an <see cref="Exception"/> at the Error level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Log message.</param>
public static void Error(Exception ex, [Localizable(false)] string message)
{
Write(ex, LogLevel.Error, message, null);
}

/// <summary>
/// Logs the specified message without an <see cref="Exception"/> at the Fatal level.
/// </summary>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Fatal([Localizable(false)] string message, params object[] args)
{
Write(LogLevel.Fatal, message, args);
Write(null, LogLevel.Fatal, message, args);
}

/// <summary>
/// Logs the specified message at the Fatal level.
/// Logs the specified message without an <see cref="Exception"/> at the Fatal level.
/// </summary>
/// <param name="message">Log message.</param>
public static void Fatal([Localizable(false)] string message)
{
Write(LogLevel.Fatal, message, null);
Write(null, LogLevel.Fatal, message, null);
}


/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Fatal level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Message which may include positional parameters.</param>
/// <param name="args">Arguments to the message.</param>
[StringFormatMethod("message")]
public static void Fatal(Exception ex, [Localizable(false)] string message, params object[] args)
{
Write(ex, LogLevel.Fatal, message, args);
}

/// <summary>
/// Logs the specified message with an <see cref="Exception"/> at the Fatal level.
/// </summary>
/// <param name="ex">Exception to be logged.</param>
/// <param name="message">Log message.</param>
public static void Fatal(Exception ex, [Localizable(false)] string message)
{
Write(ex, LogLevel.Fatal, message, null);
}

}
}
Loading