Project

General

Profile

Feature #22493

Add new logging options to integrate with logging-journald gem

Added by Lukas Zapletal 6 months ago. Updated about 1 month 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 loggingNew2018-02-13

Related to Foreman - Feature #3861: Better logging/reporting/audit of provisioning including contentsResolved2013-12-12

Associated revisions

Revision abbe2a04 (diff)
Added by Lukas Zapletal 5 months ago

Fixes #22493 - structured logging support

Revision c8202472 (diff)
Added by Lukas Zapletal 5 months ago

Refs #22493 - documented logging macros
[skip ci]

History

#1 Updated by Lukas Zapletal 6 months ago

  • Description updated (diff)

#2 Updated by The Foreman Bot 6 months ago

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

#3 Updated by Lukas Zapletal 6 months ago

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

#4 Updated by Lukas Zapletal 6 months ago

#5 Updated by Lukas Zapletal 5 months ago

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

#6 Updated by Marek Hulán 5 months ago

  • Legacy Backlogs Release (now unused) set to 330

#7 Updated by The Foreman Bot 5 months ago

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

#8 Updated by The Foreman Bot 5 months ago

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

#9 Updated by The Foreman Bot 4 months ago

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

#10 Updated by Lukas Zapletal 3 months ago

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

Also available in: Atom PDF