Module: ShellShock::Logger
- Included in:
- Context
- Defined in:
- lib/shell_shock/logger.rb
Instance Method Summary collapse
Instance Method Details
#log(message = nil) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/shell_shock/logger.rb', line 3 def log =nil return unless ENV['LOG_PATH'] File.open(ENV['LOG_PATH'], 'a') do |file| file.puts if file.puts yield if block_given? end end |