Class: Rake::Delphi::Logger
- Inherits:
-
Object
- Object
- Rake::Delphi::Logger
- Defined in:
- lib/rake/common/logger.rb
Constant Summary collapse
- NORMAL =
INFO = 0
- VERBOSE =
1- DEBUG =
2- TRACE =
3
Class Method Summary collapse
Class Method Details
.debug? ⇒ Boolean
10 11 12 |
# File 'lib/rake/common/logger.rb', line 10 def self.debug? return ENV['RAKE_DELPHI_TRACE'].to_i >= DEBUG end |
.trace(level, msg) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rake/common/logger.rb', line 14 def self.trace(level, msg) if ENV['RAKE_DELPHI_TRACE'].to_i >= level if msg.kind_of?(String) $stderr.puts(msg) else require 'pp' PP.pp(msg, $stderr) end end end |