Add new logging options to integrate with logging-journald gem
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).