Sha256: fa904fe011f9caac55f347a14c067e7a62a37e7faa1d8a9472ff312df5c79836

Contents?: true

Size: 465 Bytes

Versions: 3

Compression:

Stored size: 465 Bytes

Contents

require 'socket'

module Telemetry
  module Logger
    module Defaults
      def socket_hostname
        Socket.gethostname.delete_suffix('.').downcase
      end

      def env_prefix
        opts[:env_prefix] || 'telemetry'
      end

      def application
        opts[:application] || 'telemetry'
      end

      def app_version
        opts[:app_version] || Telemetry::Logger::VERSION
      end

      def opts
        @opts ||= {}
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
telemetry-logger-0.2.0 lib/telemetry/logger/defaults.rb
telemetry-logger-0.1.1 lib/telemetry/logger/defaults.rb
telemetry-logger-0.1.0 lib/telemetry/logger/defaults.rb