Sha256: eb426f95d7c8a68459da158469c7d65b4003b2b8eb5db5157f42146469b69932
Contents?: true
Size: 1.56 KB
Versions: 6
Compression:
Stored size: 1.56 KB
Contents
= file_series FileSeries is a Ruby library for writing to a group of files. Writes will be directed to new files at a configurable frequency. => logger = FileSeries.new('.', :prefix=>'test', :rotate_every=>60) => logger.write("some message\n") This will create a file like 'test-1342477810-60.log'. A new file will be created every 60 seconds. You don't need to do anything except keep calling logger.write(). Files are created as needed, so you won't end up with lots of 0-length files. If you do see a recent 0-length file, it's probably due to your OS buffering writes to the file. Other configuration options: :binary - boolean. If true, log files are opened in binary mode. (Useful for Marshal.dump) :separator - string. Appended to each write. Defaults to \n. Use something else in :binary mode. == Contributing to file_series * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet. * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it. * Fork the project. * Start a feature/bugfix branch. * Commit and push until you are happy with your contribution. * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. == Copyright Copyright (c) 2012 TED Conferences. See LICENSE.txt for further details.
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
file_series-0.6.0 | README.rdoc |
file_series-0.5.0 | README.rdoc |
file_series-0.4.0 | README.rdoc |
file_series-0.3.0 | README.rdoc |
file_series-0.2.0 | README.rdoc |
file_series-0.1.0 | README.rdoc |