On Wed, Nov 14, 2012 at 4:29 AM, Abhijeet R <abhijeet.1...@gmail.com> wrote: > Hi, > > I created a custom function by reading the doc from here > http://docs.puppetlabs.com/guides/custom_functions.html > > It's a function to return proper filepath for a specific node by looking at > various stuff like facter, absolute path location etc. Now, I have a > requirement to log the actual path returned by the function in > /var/log/puppet/puppet.log. > > How can I do that? Does this question better suited for puppet-dev or it can > be done easily? I want to use the function that's used to send debug log in > custom parser function.
You can simply use `debug "Hello World!"` inside the block passed to the `newfunction` method. You can see how the built in template() function logs debug messages at: https://github.com/puppetlabs/puppet/blob/3.0.1/lib/puppet/parser/functions/template.rb#L11 Hope this helps, -Jeff -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.