Sha256: a3b5523c7ecc8b44b04b38b7ce153ae341815b7f9a2b31fddd78a9e1f72fa47d
Contents?: true
Size: 464 Bytes
Versions: 12
Compression:
Stored size: 464 Bytes
Contents
module Coprl module Trace include Coprl::LoggerMethods private # Use a regex on your classes to enable debug logging # For example: # In your .env # export VOOM_TRACE_LOG_REGEX="^.*$" # In your code # trace {"What is it doing?" } def trace(&block) return unless ENV['VOOM_TRACE_LOG_REGEX'] logger.info {"T:#{self.class}:#{block.call}"} if /#{ENV['VOOM_TRACE_LOG_REGEX']}/.match(self.class.name) end end end
Version data entries
12 entries across 12 versions & 1 rubygems