Trevor Vaughan
2009-Sep-09 20:41 UTC
[Puppet Users] Emitting warnings in a custom function.
All, I apologize for asking the question since I know I''ve done this before, but...does anyone know how to emit warnings in a custom function? I tried Puppet.warning, but that didn''t appear to print a warning message anywhere. Thanks, Trevor --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2009-Sep-09 23:28 UTC
[Puppet Users] Re: Emitting warnings in a custom function.
On Sep 9, 2009, at 1:41 PM, Trevor Vaughan wrote:> > All, > > I apologize for asking the question since I know I''ve done this > before, but...does anyone know how to emit warnings in a custom > function? > > I tried Puppet.warning, but that didn''t appear to print a warning > message anywhere.It... should. That''s exactly how we do all of our warnings and such. Do you just get a no-op on that? -- The big thieves hang the little ones. -- Czech Proverb --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Trevor Vaughan
2009-Sep-10 11:36 UTC
[Puppet Users] Re: Emitting warnings in a custom function.
It turns out that it was happening, but getting buried in the logs on the server. I suppose that I was expecting something to come up on the client as most other warnings and errors do. I understand that a function is a server-side object, but if I ''raise Puppet::ParseError'' it certainly shows up on the client. Is there any way to propagate this warning to the client output log? Thanks, Trevor On Wed, Sep 9, 2009 at 19:28, Luke Kanies <luke@madstop.com> wrote:> > On Sep 9, 2009, at 1:41 PM, Trevor Vaughan wrote: > >> >> All, >> >> I apologize for asking the question since I know I''ve done this >> before, but...does anyone know how to emit warnings in a custom >> function? >> >> I tried Puppet.warning, but that didn''t appear to print a warning >> message anywhere. > > It... should. That''s exactly how we do all of our warnings and such. > Do you just get a no-op on that? > > -- > The big thieves hang the little ones. -- Czech Proverb > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2009-Sep-17 00:08 UTC
[Puppet Users] Re: Emitting warnings in a custom function.
The only way to do that is to create a ''notify'' resource, which is a bit more complicated from within a function. On Sep 10, 2009, at 4:36 AM, Trevor Vaughan wrote:> > It turns out that it was happening, but getting buried in the logs on > the server. > > I suppose that I was expecting something to come up on the client as > most other warnings and errors do. > > I understand that a function is a server-side object, but if I ''raise > Puppet::ParseError'' it certainly shows up on the client. > > Is there any way to propagate this warning to the client output log? > > Thanks, > > Trevor > > On Wed, Sep 9, 2009 at 19:28, Luke Kanies <luke@madstop.com> wrote: >> >> On Sep 9, 2009, at 1:41 PM, Trevor Vaughan wrote: >> >>> >>> All, >>> >>> I apologize for asking the question since I know I''ve done this >>> before, but...does anyone know how to emit warnings in a custom >>> function? >>> >>> I tried Puppet.warning, but that didn''t appear to print a warning >>> message anywhere. >> >> It... should. That''s exactly how we do all of our warnings and such. >> Do you just get a no-op on that? >> >> -- >> The big thieves hang the little ones. -- Czech Proverb >> --------------------------------------------------------------------- >> Luke Kanies | http://reductivelabs.com | http://madstop.com >> >> >>> >> > > >-- When one admits that nothing is certain one must, I think, also admit that some things are much more nearly certain than others. -- Bertrand Russell --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---