Support might ask you for detailed logs to troubleshoot issues. Increasing the log level of an entire service might require difficult, verbose changes. By making smaller, more precise changes, you can increase the log level of a service’s components. For example, by increasing the log level for file sync, part of the pe-puppetserver service, you can troubleshoot code deployments.
Version and installation information
PE version: 2015.3 and later
OS: Any
Installation type: Any
Solution
Increase the log level to identify an issue
Before you start, identify the component you want to troubleshoot. If you’re working with our team, we will give you component and service information. These steps use the appropriate values (service, logback.xml
, and logger name) for file sync.
-
On the primary server, open the service’s
logback.xml
file. In this case,/etc/puppetlabs/puppetserver/logback.xml
. -
To increase the log level, add a new logger element to
logback.xml
after the other<logger>
tags. The tags are at the bottom of the file, near the root element, which looks similar to this:<logger name="org.eclipse.jetty" level="INFO"/> <logger name="org.apache.http" level="INFO"/> <root level="info"> <!--<appender-ref ref="STDOUT"/>--> <appender-ref ref="${logappender:-DUMMY}" /> <appender-ref ref="F1"/> </root>
Add
<logger name="puppetlabs.enterprise.services.file-sync-client" level="DEBUG"/>
It should look similar to this:
<logger name="org.eclipse.jetty" level="INFO"/> <logger name="org.apache.http" level="INFO"/> <logger name="puppetlabs.enterprise.services.file-sync-client" level="DEBUG"/> <root level="info"> <!--<appender-ref ref="STDOUT"/>--> <appender-ref ref="${logappender:-DUMMY}" /> <appender-ref ref="F1"/> </root>
-
To apply the change, restart the service. In this case, on the primary server or compiler you’re troubleshooting, run:
puppet resource service pe-puppetserver ensure=stopped puppet resource service pe-puppetserver ensure=running
-
Recreate the issue.
-
When you finish troubleshooting, in
logback.xml
, either remove the line that you added or changelevel="DEBUG"
tolevel="INFO"
-
To make sure the change has been reverted, restart the service. In this case, on the primary server or compiler you’re troubleshooting, run:
puppet resource service pe-puppetserver ensure=stopped puppet resource service pe-puppetserver ensure=running
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles