Project

General

Profile

Actions

Bug #35921

closed

Logging to journal causes duplicate log entries to appear

Added by Adam Ruzicka over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Core
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When log_file is set to JOURNAL, standard logs go to the system journal. However, journal also collects what smart-proxy writes to its STDOUT, leading to duplicate (duplicate in meaning, not in shape) logs being collected.

Jan 11 05:35:27 cheerful-narwhal.example.com foreman-proxy[7405]: accept: 192.168.122.182:42420
Jan 11 05:35:27 cheerful-narwhal.example.com foreman-proxy[7405]: Rack::Handler::WEBrick is invoked.
Jan 11 05:35:27 cheerful-narwhal.example.com foreman-proxy[7405]: Started GET /features
Jan 11 05:35:27 cheerful-narwhal.example.com foreman-proxy[7405]: Finished GET /features with 200 (3.36 ms)
Jan 11 05:35:27 cheerful-narwhal.example.com smart-proxy[7405]: 192.168.122.182 - - [11/Jan/2023:05:35:27 EST] "GET /features HTTP/1.1" 200 71                                                                                                                                             
Jan 11 05:35:27 cheerful-narwhal.example.com smart-proxy[7405]: - -> /features
Jan 11 05:35:27 cheerful-narwhal.example.com foreman-proxy[7405]: close: 192.168.122.182:42420

Looks like we are setting webrick's AccessLog to an empty array for http endpoint, but not for the https one

Actions #1

Updated by The Foreman Bot over 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/854 added
Actions #2

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.7.0 added
Actions #3

Updated by Adam Ruzicka over 1 year ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Category set to Core
  • Target version set to 3.7.0
  • Triaged changed from No to Yes

While this is a bug, I'm not going to pick it to 3.6 given it's a fairly large change in behavior.

Actions

Also available in: Atom PDF