Method: Deplate::Core.log
- Defined in:
- lib/deplate/core.rb
.log(text, condition = nil, source = nil) ⇒ Object
This is the actual logging method. Every log message should pass through this method.
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lib/deplate/core.rb', line 1015 def log(text, condition=nil, source=nil) if log_valid_condition?(condition) text = log_filter(text) if source msg = (text, condition, source.file, source.begin, source.end) else msg = (text, condition) end log_to(msg) log_to(caller.join("\n")) if $DEBUG and condition == :error end end |