Ask Your Question
0

How to enable Ruby stack trace in puppet log?

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

Cardil gravatar image

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

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
1

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

Stefan gravatar image

Yes, if you run your agent with the --trace option http://docs.puppetlabs.com/references/latest/configuration.html#trace

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

Stats

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

Seen: 1,299 times

Last updated: Nov 25 '13