Skip to content

Commit e495b70

Browse files
Split procedure to increase logging levels (#3992)
* Split procedure into multiple modules * Ensure content is suitable for all flavours * Flatten the ToC * Bump leveloffset for all component-specific procedures * Reword introduction to logging levels
1 parent c0a6f0f commit e495b70

13 files changed

+246
-213
lines changed

guides/common/assembly_logging-and-reporting-problems.adoc

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,33 @@
22

33
include::modules/con_logging-and-reporting-problems.adoc[]
44

5-
include::modules/proc_increasing-the-logging-levels-to-help-with-debugging.adoc[leveloffset=+1]
5+
include::modules/con_logging-levels-of-project-components.adoc[leveloffset=+1]
6+
7+
include::modules/proc_increasing-the-logging-level-for-foreman.adoc[leveloffset=+2]
8+
9+
include::modules/proc_increasing-the-logging-level-for-hammer.adoc[leveloffset=+2]
10+
11+
include::modules/proc_increasing-the-logging-level-for-smart-proxy.adoc[leveloffset=+2]
12+
13+
ifdef::katello,orcharhino,satellite[]
14+
include::modules/proc_increasing-the-logging-level-for-candlepin.adoc[leveloffset=+2]
15+
endif::[]
16+
17+
include::modules/proc_increasing-the-logging-level-for-redis.adoc[leveloffset=+2]
18+
19+
include::modules/proc_increasing-the-logging-level-for-foreman-installer.adoc[leveloffset=+2]
20+
21+
ifdef::katello,orcharhino,satellite[]
22+
include::modules/proc_increasing-the-logging-level-for-pulp.adoc[leveloffset=+2]
23+
endif::[]
24+
25+
include::modules/proc_increasing-the-logging-level-for-puppet-agent.adoc[leveloffset=+2]
26+
27+
include::modules/proc_increasing-the-logging-level-for-puppet-server.adoc[leveloffset=+2]
28+
29+
ifndef::satellite[]
30+
include::modules/proc_increasing-the-logging-level-for-salt.adoc[leveloffset=+2]
31+
endif::[]
632

733
ifndef::foreman-deb[]
834
include::modules/ref_configuring-logging-levels-with-hammer-cli.adoc[leveloffset=+1]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id="logging-levels-of-{project-context}-components"]
4+
= Logging levels of {Project} components
5+
6+
You can set logging levels for individual {Project} components.
7+
The default logging level is `info`.
8+
You can increase the logging level of {Project} components to troubleshoot {Project}.
9+
Increasing the logging level to `debug` provides the most detailed information.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-candlepin"]
4+
= Increasing the logging level for Candlepin
5+
6+
You can find the logs in `/var/log/candlepin/candlepin.log` and `/var/log/candlepin/error.log`.
7+
8+
.Procedure
9+
. Set the logging level to `DEBUG`:
10+
+
11+
[options="nowrap", subs="+quotes,verbatim,attributes"]
12+
----
13+
# {foreman-installer} --katello-candlepin-loggers log4j.logger.org.candlepin:DEBUG
14+
----
15+
+
16+
If the candlepin log files are too verbose, you can decrease the default debug level:
17+
+
18+
[options="nowrap", subs="+quotes,verbatim,attributes"]
19+
----
20+
# {foreman-installer} \
21+
--katello-candlepin-loggers log4j.logger.org.candlepin:DEBUG \
22+
--katello-candlepin-loggers log4j.logger.org.candlepin.resource.ConsumerResource:WARN \
23+
--katello-candlepin-loggers log4j.logger.org.candlepin.resource.HypervisorResource:WARN
24+
----
25+
. After you complete debugging, reset the logging level to the default value:
26+
+
27+
[options="nowrap", subs="+quotes,verbatim,attributes"]
28+
----
29+
# {foreman-installer} --reset-katello-candlepin-loggers
30+
----
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-{foreman-installer}"]
4+
= Increasing the logging level for {foreman-installer}
5+
6+
`{foreman-installer}` writes logs to `/var/log/foreman-installer/`.
7+
8+
.Procedure
9+
* Increase the logging level of the `{foreman-installer}` utility:
10+
+
11+
[options="nowrap", subs="+quotes,verbatim,attributes"]
12+
----
13+
# {foreman-installer} --verbose-log-level debug
14+
----
15+
+
16+
Note that this only affects standard output but not any log files written to disk.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-foreman"]
4+
= Increasing the logging level for Foreman
5+
6+
By default, you can find the log in `/var/log/foreman/production.log`.
7+
For more information, see xref:configuring-logging-type-and-layout_{context}[].
8+
9+
.Procedure
10+
. Set the logging level to `debug`:
11+
+
12+
[options="nowrap", subs="+quotes,verbatim,attributes"]
13+
----
14+
# {foreman-installer} --foreman-logging-level debug
15+
----
16+
. After you complete debugging, reset the logging level to the default value:
17+
+
18+
[options="nowrap", subs="+quotes,verbatim,attributes"]
19+
----
20+
# {foreman-installer} --reset-foreman-logging-level
21+
----
22+
23+
.Additional resources
24+
For more information about {Project} logging settings, use `{foreman-installer}` with the `--full-help` option:
25+
26+
[options="nowrap", subs="+quotes,verbatim,attributes"]
27+
----
28+
# {foreman-installer} --full-help | grep logging
29+
----

guides/common/modules/proc_increasing-the-logging-level-for-hammer.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
You can find the log in `~/.hammer/log/hammer.log`.
77

88
.Procedure
9-
109
* In `/etc/hammer/cli_config.yml`, set the `:log_level:` option to `debug`:
11-
12-
[options="nowrap", subs="+quotes,verbatim,attributes"]
10+
+
11+
[source, yaml, options="nowrap", subs="+quotes,verbatim,attributes"]
1312
----
1413
:log_level: 'debug'
1514
----
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-pulp"]
4+
= Increasing the logging level for Pulp
5+
6+
Pulp logs to the systemd journal.
7+
You can view the logs using `journalctl --unit 'pulpcore*'`.
8+
9+
.Procedure
10+
. In `/etc/pulp/settings.py`, set the logging level to `DEBUG`:
11+
+
12+
[source, none, options="nowrap", subs="+quotes,verbatim,attributes"]
13+
----
14+
LOGGING = {"dynaconf_merge": True, "loggers": {'': {'handlers': ['console'], 'level': 'DEBUG'}}}
15+
----
16+
. Restart the Pulp services:
17+
+
18+
[options="nowrap", subs="+quotes,verbatim,attributes"]
19+
----
20+
# systemctl restart \
21+
pulpcore-api \
22+
pulpcore-content \
23+
pulpcore-resource-manager \
24+
pulpcore-worker@\*
25+
----
26+
27+
// foreman-installer does not expose all Pulp configuration options
28+
29+
[NOTE]
30+
====
31+
Running `{foreman-installer}` will revert the setting to default.
32+
====
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-puppet-agent"]
4+
= Increasing the logging level for Puppet agent
5+
6+
You can find the logs in `/var/log/puppetlabs/puppet/`.
7+
8+
.Prerequisites
9+
* You have enabled Puppet on your {Project}.
10+
For more information, see {ManagingConfigurationsPuppetDocURL}Enabling_Puppet_Integration_managing-configurations-puppet[Enabling Puppet Integration with {Project}] in _{ManagingConfigurationsPuppetDocTitle}_.
11+
12+
.Procedure
13+
* Set the logging level to `debug`:
14+
+
15+
[options="nowrap", subs="+quotes,verbatim,attributes"]
16+
----
17+
# {foreman-installer} --puppet-agent-additional-settings log_level:debug
18+
----
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-puppet-server"]
4+
= Increasing the logging level for Puppet server
5+
6+
You can find the logs in `/var/log/puppetlabs/puppetserver/`.
7+
8+
.Prerequisites
9+
* You have enabled Puppet on your {Project}.
10+
For more information, see {ManagingConfigurationsPuppetDocURL}Enabling_Puppet_Integration_managing-configurations-puppet[Enabling Puppet Integration with {Project}] in _{ManagingConfigurationsPuppetDocTitle}_.
11+
12+
.Procedure
13+
* Set the logging level to `debug`:
14+
+
15+
[options="nowrap", subs="+quotes,verbatim,attributes"]
16+
----
17+
# {foreman-installer} --puppet-server-additional-settings log_level:debug
18+
----
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="increasing-the-logging-level-for-redis"]
4+
= Increasing the logging level for Redis
5+
6+
You can find the log for Redis in `/var/log/redis/redis.log`.
7+
8+
.Procedure
9+
. In `/etc/redis/redis.conf`, set the logging level to `debug`:
10+
+
11+
[source, none, options="nowrap", subs="+quotes,verbatim,attributes"]
12+
----
13+
loglevel debug
14+
----
15+
. Restart the Redis service:
16+
+
17+
[options="nowrap", subs="+quotes,verbatim,attributes"]
18+
----
19+
# systemctl restart redis
20+
----
21+
22+
// foreman-installer does not expose all Redis configuration options
23+
24+
[NOTE]
25+
====
26+
Running `{foreman-installer}` will revert the setting to default.
27+
====

0 commit comments

Comments
 (0)