Sha256: ee892d9410e65ccac5cf608ce5c2048d531ae4fa2f8d1ccc82dc202ef0d28142

Contents?: true

Size: 354 Bytes

Versions: 4

Compression:

Stored size: 354 Bytes

Contents

module Princely
  module Logging

    class << self
      attr_accessor :logger, :filename

      def logger
        @logger ||= defined?(Rails) ? Rails.logger : StdoutLogger
      end

      def filename
        pathname = defined?(Rails) ? Rails.root : Princely.root
        @filename ||= pathname.join 'log', 'prince.log'
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
princely-2.1.0 lib/princely/logging.rb
princely-2.0.2 lib/princely/logging.rb
princely-2.0.1 lib/princely/logging.rb
princely-2.0.0 lib/princely/logging.rb