Logging improvement
Logging bug fixes and improvements:
- Empty task descriptions issue
- Public child conditions for check which of them were met by IUpdateTask
Public child conditions for check which of them were met by IUpdateTask
What does that mean? can you share an example?
For the rest, it looks great, if you could submit as a separate PR I can merge that in
What does that mean? can you share an example?
Example from our project (UpdateBootstrapper class, which works with NAppUpdate):
foreach(var updateTask in tasks) { var fileUpdateTask = updateTask as FileUpdateTask; var updateText = fileUpdateTask?.LocalPath ?? updateTask.Description; var version = fileUpdateTask?.Version; if(version != null) version = " [" + version + "]"; log.Info("Обновление: " + updateText + version); var conditions = updateTask.UpdateConditions.ChildConditions; foreach(var conditionItem in conditions) { var notCondition = conditionItem.ConditionType.HasFlag(BooleanCondition.ConditionType.NOT); if(conditionItem.Condition.IsMet(updateTask) ^ !notCondition) continue; var notPrefix = notCondition ? "not " : null; log.Debug("Причина: " + notPrefix + conditionItem.Condition); } }
This allows us to check for each file what conditions enforced the file update. In some cases it is usefull for detecting problems with update feed.
could submit as a separate PR I can merge that in
What does "separate" mean? Combain commits to single commit? Or you mean, make PR for making children conditions public only?