Ask Your Question

How to enable Ruby stack trace in puppet log?

asked 2013-11-25 02:37:17 -0600

Cardil gravatar image

updated 2013-11-25 02:37:47 -0600

Is it possible to enable displaing of Ruby stack traces in Puppet logs? By default only short message is displayed without even a file and line of error origin, fo ex.:

err: Jboss::Resourceadapter[jca-filestore.rar]/Jboss_resourceadapter[jca-filestore.rar]/ensure: change from absent to present failed: Could not set 'present on ensure: undefined method `[]' for nil:NilClass at /etc/puppetlabs/puppet/jboss/manifests/resourceadapter.pp:33

For example, by default in Ruby there are more information on exceptions:

/home/user/code/sampleerror.rb:9:in `dosome': undefined method `[]' for nil:NilClass (NoMethodError)
    from /home/user/code/init.rb:4:in `<main>'</main>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-25 14:47:13 -0600

Stefan gravatar image

Yes, if you run your agent with the --trace option

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-11-25 02:37:17 -0600

Seen: 1,810 times

Last updated: Nov 25 '13