Project

General

Profile

Actions

Feature #3571

closed

add possibility to ignore/hide :debug and :info logs

Added by David Schmitt about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Reporting
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

please apply the following patch to fix a minor glitch when running puppet agent --verbose:

diff --git a/modules/foreman/templates/foreman-report_v2.rb.erb b/modules/foreman/templates/foreman-report_v2.rb.erb
index cd93985..d127643 100644
--- a/modules/foreman/templates/foreman-report_v2.rb.erb
+++ b/modules/foreman/templates/foreman-report_v2.rb.erb
@@ -99,7 +99,8 @@ Puppet::Reports.register_report(:foreman) do

     # special fix for false warning about skips
     # sometimes there are skip values, but there are no error messages, we ignore them.
-    if report_status["skipped"] > 0 and ((report_status.values.inject(:+)) - report_status["skipped"] == report.logs.size)
+    # add one for ignoring the "Finished catalog run in X seconds" notice
+    if report_status["skipped"] > 0 and ((report_status.values.inject(:+)) - report_status["skipped"] + 1 == report.logs.find_all { |l| l.level != :debug and l.level != :info }.size)
       report_status["skipped"] = 0
     end
     # fix for reports that contain no metrics (i.e. failed catalog)
Actions #1

Updated by Dominic Cleal about 11 years ago

  • Project changed from Foreman to Installer
  • Category changed from Reporting to Foreman modules

Would you mind submitting a PR to https://github.com/theforeman/puppet-foreman? Thanks!

Actions #2

Updated by Anonymous almost 11 years ago

  • Status changed from New to Ready For Testing
Actions #3

Updated by Anonymous almost 11 years ago

  • Project changed from Installer to Foreman
  • Subject changed from foreman: fix report.rb to ignore :debug and :info logs to add possibility to ignore/hide :debug and :info logs
  • Category changed from Foreman modules to Reporting
  • Assignee set to Anonymous
Actions #4

Updated by Anonymous almost 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
  • Translation missing: en.field_release set to 2

I'm closing this.
David, I hope the filter in the UI is a solution for you.

Actions #5

Updated by Dominic Cleal almost 11 years ago

  • Target version set to 1.9.2
Actions

Also available in: Atom PDF