Sha256: bd754d29605cbb7146081fbb042f81221209fbcde41f8abdc4c71754da67defa

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

require 'logger'

module LaunchpadMk2

  # This module provides logging facilities. Just include it to be able to log
  # stuff.
  module Logging

    # Returns the logger to be used by the current instance.
    # 
    # Returns:
    # 
    # the logger set externally or a logger that swallows everything
    def logger
      @logger ||= Logger.new(nil)
    end

    # Sets the logger to be used by the current instance.
    # 
    # [+logger+]  the [Logger] instance
    def logger=(logger)
      @logger = logger
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
launchpad_mk2-0.0.1 lib/launchpad_mk2/logging.rb