Loggers

A logger in the logback.xml acts as a pointer for the logs produced by the application:

    <logger name="puppetlabs.pcp" level="info" additivity="false">      <appender-ref ref="PCP"/>    </logger>

This example connects to the puppetlabs.pcp log in the Puppetserver application, and collects the info-level logs. The additivity=false flag tells the log to replace the file, rather than append to it. Finally, the appender-ref tag tells the logger which appender to use for the logging configuration.

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.