Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Commit

Permalink
write docs about class
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2gedev committed Jan 29, 2015
1 parent 97d753b commit e1e0abd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Build Status](https://travis-ci.org/ma2gedev/chrono_logger.svg)](https://travis-ci.org/ma2gedev/chrono_logger)
[![Code Climate](https://codeclimate.com/github/ma2gedev/chrono_logger/badges/gpa.svg)](https://codeclimate.com/github/ma2gedev/chrono_logger)
[![Coverage Status](https://coveralls.io/repos/ma2gedev/chrono_logger/badge.svg)](https://coveralls.io/r/ma2gedev/chrono_logger)
[![Inline docs](http://inch-ci.org/github/ma2gedev/chrono_logger.svg?branch=master)](http://inch-ci.org/github/ma2gedev/chrono_logger)
[![endorse](https://api.coderwall.com/ma2gedev/endorsecount.png)](https://coderwall.com/ma2gedev)

A lock-free logger with timebased file rotation.
Expand Down
9 changes: 9 additions & 0 deletions lib/chrono_logger.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
require "chrono_logger/version"
require 'logger'

# A lock-free logger with timebased file rotation.
class ChronoLogger < Logger

# @param logdev [String, IO] `Time#strftime` formatted filename (String) or IO object (typically STDOUT, STDERR, or an open file).
# @example
#
# ChronoLogger.new('/log/production.log.%Y%m%d')
# Time.now.strftime('%F') => "2015-01-29"
# File.exist?('/log/production.log.20150129') => true
#
def initialize(logdev)
@progname = nil
@level = DEBUG
Expand Down

0 comments on commit e1e0abd

Please sign in to comment.