SimpleRotate

Simple and safety logger for Ruby language

Usage example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
log = SimpleRotate.instance

# initialize - set as your preference
log.init("/var/log/ruby/app/foo.log", "100M", 4)

# to enable file compression
log.compress

# write logs
log.warn.w("Warning message")
log.w("This is warning too")

def caught_fatal()
    # You can take over preference
    # because SimpleRotate is singleton pattern
    SimpleRotate.instance.fatal.w("Fatal message")
end