diff options
| author | Steve Kemp <steve@steve.org.uk> | 2015-03-04 11:59:59 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2015-03-04 11:59:59 +0000 | 
| commit | 7e9399d3228e2a695d66ec1b8d7e47216a6a1bf7 (patch) | |
| tree | 5c49c532169221bbbaf21f696ed1bafc18ed388e /lib/custodian | |
| parent | 37593359e8084dbcd53358acd41d83e13ae88e2a (diff) | |
Don't use a logger.
Instead we run quietly if nothing was output, and run verbosely if we
see "--verbose".
Diffstat (limited to 'lib/custodian')
| -rw-r--r-- | lib/custodian/worker.rb | 25 | 
1 files changed, 2 insertions, 23 deletions
| diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb index e036168..c11ae71 100644 --- a/lib/custodian/worker.rb +++ b/lib/custodian/worker.rb @@ -1,12 +1,4 @@ - -# -# Standard modules -# -require 'logger' - - -  #  # Our modules.  # @@ -61,12 +53,6 @@ module Custodian      # -    # The log-file object -    # -    attr_reader :logger - - -    #      # The settings from the global configuration file      #      attr_reader :settings @@ -87,10 +73,6 @@ module Custodian        # Get the alerter-type(s) to instantiate        @alerter = settings.alerter -      # Instantiate the logger. -      logfile = settings.log_file -      @logger = Logger.new( logfile, "daily" ) -        # Save the settings        @settings = settings @@ -106,11 +88,10 @@ module Custodian      # -    # Write the given message to our logfile - and show it to the console too. +    # Show to the console if "--verbose" was specified.      #      def log_message( msg ) -      @logger.info( msg ) -      puts msg +      puts msg if ( ENV["VERBOSE" ] )      end @@ -121,8 +102,6 @@ module Custodian      #      def run!        while( true ) -        log_message( "\n" ) -        log_message( "\n" )          log_message( "Waiting for job.." )          process_single_job()        end | 
