Project

General

Profile

Feature #22493

Add new logging options to integrate with logging-journald gem

Added by Lukas Zapletal about 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Logging
Target version:

Description

Foreman uses logging gem for all logging, this has new plugin which enables structured logging into system journal (https://github.com/lzap/logging-journald). This feature will add configuration options to use the logging plugin.

Foreman already uses MDC (mapped diagnostic context) for session/request id. As part of this effort, we will add more MDC flags which are logged as structured fields in journald:

  • logger name
  • user login
  • organization label
  • location label
  • request id
  • session id (safe only)
  • remote ip address

As part of this, logging-journald will become hard dependency of foreman-core. Nothing is changing for development logging configuration, but for production we will make changes in the installer to send logs into journald and splitting them via rsyslog back into production.log for easier transition for existing users and tools. To be able to do that, all logs will be sent to facility local6 (configurable option).

Further reading:


Related issues

Related to Installer - Feature #22559: Configure foreman to log to system journalClosed
Related to Foreman - Tracker #22569: Unified and structured loggingAssigned

Related to Foreman - Feature #3861: Better logging/reporting/audit of provisioning including contentsResolved2013-12-12
Related to Foreman - Bug #26039: Templates are getting rendered in production.logClosed

Associated revisions

Revision abbe2a04 (diff)
Added by Lukas Zapletal about 1 year ago

Fixes #22493 - structured logging support

Revision c8202472 (diff)
Added by Lukas Zapletal about 1 year ago

Refs #22493 - documented logging macros
[skip ci]

History

#1 Updated by Lukas Zapletal about 1 year ago

  • Description updated (diff)

#2 Updated by The Foreman Bot about 1 year ago

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

#3 Updated by Lukas Zapletal about 1 year ago

  • Related to Feature #22559: Configure foreman to log to system journal added

#4 Updated by Lukas Zapletal about 1 year ago

#5 Updated by Lukas Zapletal about 1 year ago

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

#6 Updated by Marek Hulán about 1 year ago

  • Legacy Backlogs Release (now unused) set to 330

#7 Updated by The Foreman Bot about 1 year ago

  • Pull request https://github.com/theforeman/foreman/pull/5339 added

#8 Updated by The Foreman Bot about 1 year ago

  • Pull request https://github.com/theforeman/puppet-foreman/pull/631 added

#9 Updated by The Foreman Bot about 1 year ago

  • Pull request https://github.com/theforeman/foreman/pull/5421 added

#10 Updated by Lukas Zapletal 11 months ago

  • Related to Feature #3861: Better logging/reporting/audit of provisioning including contents added

#11 Updated by Tomer Brisker 2 months ago

  • Related to Bug #26039: Templates are getting rendered in production.log added

Also available in: Atom PDF