Debugging and logging

Any mco command can be run with the -v (verbose) option. The verbose option outputs progress information as well as a summary. To debug mco, you have to edit the configuration file (client.cfg) and change the loglevel parameter. The default logging level is warn. Change this to debug when debugging. Another important option is logger_type. The logger_type option defines how mco outputs its logging information. The possible values are syslog, file, and console. With loglevel set to debug, you can trace the connection to ActiveMQ, as shown in the following output:

[root@trouble ~]# mco find -v
...
info 2015/04/17 17:59:35: activemq.rb:114:in 'on_connecting' TCP Connection attempt 0 to stomp://client@puppet.example.com:61613 ...

Get Troubleshooting Puppet 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.