Issue #21214 has been updated by Mohit Chawla.

Sorry for such a late response. 

Report processor code:

    require 'puppet'
    Puppet::Reports.register_report(:test) do
      def process
        Puppet.info("Info msg")
        Puppet.notice("Notice msg")
        Puppet.debug("Debug msg")
      end
    end

With the above code and WITHOUT --debug option for puppetmaster, here's the log:
Jun 25 08:30:45 precise32 puppet-agent[2819]: Finished catalog run in 0.07 
seconds
Jun 25 08:30:45 precise32 puppet-master[2582]: Notice msg

With --debug enabled on puppetmaster:
Jun 25 08:31:46 precise32 puppet-agent[3231]: Finished catalog run in 0.07 
seconds
Jun 25 08:31:46 precise32 puppet-master[2987]: Received report to process from 
precise32.internal.directi.com
Jun 25 08:31:46 precise32 puppet-master[2987]: Processing report from 
precise32.internal.directi.com with processor Puppet::Reports::Test
Jun 25 08:31:46 precise32 puppet-master[2987]: Info msg
Jun 25 08:31:46 precise32 puppet-master[2987]: Notice msg
Jun 25 08:31:46 precise32 puppet-master[2987]: Debug msg


The surprising bit about above is that I've seen even sometimes Puppet.notice 
not logging unless --debug is enabled. Unfortunately I am unable to reproduce 
that specifically, but as you can see even Info messages don't get logged. 
  


----------------------------------------
Bug #21214: Logging is broken unless --debug enabled
https://projects.puppetlabs.com/issues/21214#change-93538

* Author: Mohit Chawla
* Status: Needs More Information
* Priority: Normal
* Assignee: Mohit Chawla
* Category: 
* Target version: 
* Affected Puppet version: 2.7.20
* Keywords: logs, logging
* Branch: 
----------------------------------------
I was able to reproduce this behaviour on Puppet 2.7.20 on Ubuntu Precise 32 
bit and CentOS 6.4 64 bit. 

If I use Puppet.info or Puppet.notice or Puppet.err statements in puppet code, 
specifically tested from report processors code, they are not logged until I 
enable --debug in puppet master startup options. 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to