Skip to content

Instantly share code, notes, and snippets.

@Telmo
Forked from sentientmonkey/test-logging.rb
Created March 20, 2013 01:10
Show Gist options
  • Save Telmo/5201554 to your computer and use it in GitHub Desktop.
Save Telmo/5201554 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'logger'
# rotatelogs required...
# http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
logger = Logger.new("|rotatelogs ./foo.log.%Y-%m-%d-%H 3600", 0, 0)
10.times do
logger.error "testing..."
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment