puppetserver 5 logging to STDOUT misses puppet compiler messages

75 views
Skip to first unread message

Thomas Müller

unread,
Jul 9, 2018, 5:32:53 AM7/9/18
to Puppet Users
Hi

I wan't my puppetserver 5.3 to log to STDOUT in addition or as replacement for /var/log/puppetlabs/puppetserver/puppetserver.log.

I've added the following to the /etc/puppetlabs/puppetserver/logback.xml config file:

<configuration>
...
<root level="info">
  ...
  <appender-ref ref="STDOUT" />
</root>
</configuration>

I can see that after a service restart some of the messages get printed to stdout - but not all.

All the puppet compiler messages  are not added to STDOUT but they are in puppetserver.log.

Example messages not added to STDOUT:

Pupppet The function 'xy' is deprecated in favor of using 'lookup' ...
Puppet This method is deprecated, please use the ...
Puppet Undefined variable '...' ...
Puppet Compiled catalog for ... in environment .... in ... seconds

Same if I remove the F1 appender-ref to disable logging to puppetserver.log.

Is there some additional config required to log everything that is logged to the file also to STDOUT?

- Thomas

Thomas Müller

unread,
Jul 11, 2018, 2:09:51 AM7/11/18
to Puppet Users
The log is actually logged - I had some wrong assumptions how systemd/journald logs.

journalctl -u puppetserver.service

only contains logs until the systemd service is started.

To get the STDOUT output of the puppetserver java process one can use:

journalctl -t puppetserver

or in case of CentOS/RHEL 7 this is normally also available in /var/log/messages

- Thomas
Reply all
Reply to author
Forward
0 new messages