Report abuse

1
2
3
4
5
6
7
8
9
10
11
class Logging
  @timestamp = true
  
  def puts(str)
    Kernel::puts("#{now}#{str}")
  end

  def now
    @timestamp ? Time.now.strftime(' %Y-%m-%d %H:%m:%S  ') : ''
  end
end