mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Updated NLog exception logging format to capture all details
Updated the NLog exception handling to make use of the additional logging options released recently. This will help provide me with more details when users create the Support ZIP File.
This commit is contained in:
parent
895a6d4e10
commit
e99db6d4af
@ -262,7 +262,7 @@ namespace DisplayMagician {
|
||||
{
|
||||
FileName = AppLogFilename,
|
||||
DeleteOldFileOnStartup = true,
|
||||
Layout = "${longdate}|${level:uppercase=true}|${logger}|${message}${onexception:EXCEPTION OCCURRED\\:${exception:format=type,message,method:maxInnerExceptionLevel=5:innerFormat=shortType,message,method}}"
|
||||
Layout = "${longdate}|${level:uppercase=true}|${logger}|${message}|${onexception:EXCEPTION OCCURRED \\:${exception::format=toString,Properties,Data}"
|
||||
};
|
||||
|
||||
// Create a logging rule to use the log file target
|
||||
@ -275,7 +275,7 @@ namespace DisplayMagician {
|
||||
// Create the log console target
|
||||
var logconsole = new NLog.Targets.ColoredConsoleTarget("logconsole")
|
||||
{
|
||||
Layout = "${longdate}|${level:uppercase=true}|${logger}|${message}${onexception:EXCEPTION OCCURRED\\:${exception:format=type,message,method:maxInnerExceptionLevel=5:innerFormat=shortType,message,method}}"
|
||||
Layout = "${longdate}|${level:uppercase=true}|${logger}|${message}|${onexception:EXCEPTION OCCURRED \\:${exception::format=toString,Properties,Data}"
|
||||
};
|
||||
|
||||
// Create a logging rule to use the log console target
|
||||
|
@ -26,8 +26,8 @@ using System.Resources;
|
||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("2.4.0.69")]
|
||||
[assembly: AssemblyFileVersion("2.4.0.69")]
|
||||
[assembly: AssemblyVersion("2.4.0.71")]
|
||||
[assembly: AssemblyFileVersion("2.4.0.71")]
|
||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
|
@ -1482,7 +1482,7 @@ namespace DisplayMagicianShared
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Guess that it is at the bottom (90% correct)
|
||||
SharedLogger.logger.Error(ex, $"ProfileItem/GetWindowsScreenPositions: Exception trying to get the position of the taskbar on display {targetId}");
|
||||
SharedLogger.logger.Warn(ex, $"ProfileItem/GetWindowsScreenPositions: Exception trying to get the position of the taskbar on display {targetId}");
|
||||
screen.TaskBarEdge = TaskBarLayout.TaskBarEdge.Bottom;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user