Improve logging
authorLiza Carvelli <liza@carvel.li>
Thu, 20 Jun 2024 23:00:29 +0000 (01:00 +0200)
committerLiza Carvelli <liza@carvel.li>
Thu, 20 Jun 2024 23:00:29 +0000 (01:00 +0200)
Questionable/Controller/QuestController.cs

index 46adb25baec9c91e0f2387e34c2c63026190b960..4ed4f59b19a9f0dcd12cd42d07531c2d1bf48356 100644 (file)
@@ -410,7 +410,7 @@ internal sealed class QuestController
             {
                 IList<ITask> tasks = x.CreateAllTasks(CurrentQuest.Quest, seq, step).ToList();
 
-                if (_logger.IsEnabled(LogLevel.Trace))
+                if (tasks.Count > 0 && _logger.IsEnabled(LogLevel.Trace))
                 {
                     string factoryName = x.GetType().FullName ?? x.GetType().Name;
                     if (factoryName.Contains('.', StringComparison.Ordinal))