Skip to content

Latest commit

 

History

History
39 lines (35 loc) · 1.6 KB

proc_configuring-logging-to-journal-or-file-based-logging.adoc

File metadata and controls

39 lines (35 loc) · 1.6 KB

Configuring Logging to Journal or File-based Logging

{Project} uses file-based logging by default. You can use the {foreman-installer} command to reconfigure logging.

Procedure for configuring logging with Journal
  1. Enter the following {foreman-installer} command to configure logging to the journald service:

    # {foreman-installer} \
    --foreman-logging-type journald \
    --foreman-proxy-log JOURNAL
  2. Optional: To inspect the log messages, use the journalctl utility. For example:

    • journalctl --unit foreman and journalctl --unit foreman-proxy show messages for the foreman and foreman-proxy units

    • journalctl REQUEST=request_ID shows messages for a specified request

Procedure for configuring file-based logging
  1. Enter the following {foreman-installer} command to configure file-based logging:

    # {foreman-installer} \
    --reset-foreman-logging-type \
    --reset-foreman-proxy-log
  2. Optional: To inspect the log messages, view these files:

    • /var/log/foreman/production.log

    • /var/log/foreman-proxy.log