Project

General

Profile

Actions

Bug #35921

closed

Logging to journal causes duplicate log entries to appear

Added by Adam Ruzicka almost 2 years 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

Also available in: Atom PDF