Sha256: 31bebdf24d7b6b692a10abc572aaa43b34579d6a231c75596e9ec17fbcba8d2a
Contents?: true
Size: 718 Bytes
Versions: 2
Compression:
Stored size: 718 Bytes
Contents
# frozen_string_literal: true require "logger" require "singleton" class String def camel_case_lower split("_").inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join end end module Shatter module Util class Logger < ::Logger include Singleton def initialize super($stdout, datetime_format: "%Y-%m-%d %H:%M:%S") end end def self.instances_key "/shater_service_instances" end def self.zookeeper_response_key_root "/shatter::response_data_locations" end def self.zookeeper_response_key(uuid) raise "Cant produce key without uuid" if uuid.nil? "#{zookeeper_response_key_root}/#{uuid}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shatter-rb-0.1.1 | lib/shatter/util.rb |
shatter-rb-0.1.0 | lib/shatter/util.rb |