Project

General

Profile

Bug #9606

The debug level logging adds many ESC charactors in the production.log file

Added by Ori Rabin over 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1192898
Description of problem:

After we enable the debug level on the satellite v 6 server by following steps described in - https://access.redhat.com/solutions/1155573

The production.log contain many ESC chars in every logged line.

<snip>

ESC[1mESC[35mHost::Base Load (0.4ms)ESC[0m  SELECT "hosts".* FROM "hosts" WHERE "hosts"."certname" = 'reslnwbcogdev03.research.chop.edu' LIMIT 1
ESC[1mESC[36m (0.1ms)ESC[0m ESC[1mBEGINESC[0m
ESC[1mESC[35mHostgroup Load (0.2ms)ESC[0m SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = 2 ORDER BY hostgroups.title LIMIT 1
ESC[1mESC[36mSetting Load (0.2ms)ESC[0m ESC[1mSELECT "settings".* FROM "settings" WHERE "settings"."name" = 'root_pass' ORDER BY name LIMIT 1ESC[0m
ESC[1mESC[35mCACHE (0.0ms)ESC[0m SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'root_pass' ORDER BY name LIMIT 1
ESC[1mESC[36m (0.8ms)ESC[0m ESC[1mUPDATE "hosts" SET "last_report" = '2015-02-12 20:49:09.000000', "updated_at" = '2015-02-12 20:49:26.266683' WHERE "hosts"."type" IN ('H
ost::Managed') AND "hosts"."id" = 27ESC[0m
ESC[1mESC[35m (0.6ms)ESC[0m COMMIT
ESC[1mESC[36m (0.0ms)ESC[0m ESC[1mBEGINESC[0m

</snip>

To diagnose issues we need debug logs without ESC chars and with timestamp.

Also, there is other bugzilla raised to have timestamp in the production.log file:

https://bugzilla.redhat.com/show_bug.cgi?id=1101093


Related issues

Related to Foreman - Bug #6044: production.log should have timestamps in itClosed2014-06-03

Associated revisions

Revision 0ecc13d3 (diff)
Added by Ori Rabin over 7 years ago

Fixes #9606 - ANSI color codes should not be used in production log

Revision e886d04a (diff)
Added by Ori Rabin over 7 years ago

Fixes #9606 - ANSI color codes should not be used in production log

(cherry picked from commit 0ecc13d3ba3061875b5fa6638d602f62c7dfd401)

History

#1 Updated by Dominic Cleal over 7 years ago

  • Related to Bug #6044: production.log should have timestamps in it added

#2 Updated by Dominic Cleal over 7 years ago

  • Category set to Rails
  • Priority changed from High to Low

#6044 added timestamps. Just use "less -r" to interpret escape characters.

#3 Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2220 added
  • Pull request deleted ()

#4 Updated by Marek Hulán over 7 years ago

not sure about the Release field here, I doubt it was a bug and as a feature it should probably go to 1.9 but since it's tiny and useful, it might go into 1.8

#5 Updated by Dominic Cleal over 7 years ago

  • Legacy Backlogs Release (now unused) set to 28

Seems low risk enough to include in 1.8, provided our nightly tests pass.

#6 Updated by Ori Rabin over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF