logging - Ruby - How to create log file by limiting file size using Logger? -
logging - Ruby - How to create log file by limiting file size using Logger? -
i want create log file default file size limit , 1 time reaches file size,a new log file has created.
i referred logger in ruby doc , had illustration this
logger = logger.new('foo.log', 10, 1024000)
i not understand sec parameter 10 do?
the of import part logger docs:
leave 10 “old log files”
when current log file switched, 10 older log files preserved. if after log rotation there 11 files remaining, oldest 1 deleted.
ruby logging
Comments
Post a Comment