diff --git a/MFiles.VAF.Extensions/Dashboards/Commands/ShowLatestLogEntriesDashboardCommand.cs b/MFiles.VAF.Extensions/Dashboards/Commands/ShowLatestLogEntriesDashboardCommand.cs index 056bbff..8101d70 100644 --- a/MFiles.VAF.Extensions/Dashboards/Commands/ShowLatestLogEntriesDashboardCommand.cs +++ b/MFiles.VAF.Extensions/Dashboards/Commands/ShowLatestLogEntriesDashboardCommand.cs @@ -272,6 +272,19 @@ ClientOperations clientOps } } + // Ensure that the log entries are in descending order. + if (null != logEntries?.Entries) + logEntries.Entries.Sort + ( + (a, b) => + { + if (a.DateTime == null && b.DateTime == null) return 0; + if (a.DateTime == null) return 1; // null goes after non-null + if (b.DateTime == null) return -1; // null goes after non-null + return b.DateTime.Value.CompareTo(a.DateTime.Value); // reverse order + } + ); + // Create the directive. clientOps.Directives.Add(new VAF.Configuration.Domain.ClientDirective.UpdateDashboardContent() { diff --git a/MFiles.VAF.Extensions/Resources/DisplayLatestLogEntries.html b/MFiles.VAF.Extensions/Resources/DisplayLatestLogEntries.html index ce577c2..95d6e5b 100644 --- a/MFiles.VAF.Extensions/Resources/DisplayLatestLogEntries.html +++ b/MFiles.VAF.Extensions/Resources/DisplayLatestLogEntries.html @@ -493,6 +493,13 @@
+
+ Note that in multi-server instances the log data may be spread amongst multiple files. + This viewer attempts to pull data from all server nodes into one location but there + are situations where data may not be in the correct order, especially in high-volume + deployments or high-verbosity configurations. + If in doubt, always download the log files and manually inspect what each node is doing. +
The logger is not using the default log layout, so structured formatting cannot be applied.