README.md in vidazing_logger-0.1.0 vs README.md in vidazing_logger-0.2.0

- old
+ new

@@ -1,22 +1,27 @@ -# logger-gem +# logger-gem [![Gem Version](https://badge.fury.io/rb/vidazing_logger.svg)](https://badge.fury.io/rb/vidazing_logger) + +[![Build Status](https://travis-ci.org/VidaZing/logger_gem.svg?branch=master)](https://travis-ci.org/VidaZing/logger_gem) +[![Inline docs](http://inch-ci.org/github/VidaZing/logger_gem.svg?branch=master)](http://inch-ci.org/github/VidaZing/logger_gem) +[![Coverage Status](https://coveralls.io/repos/github/VidaZing/logger_gem/badge.svg?branch=master)](https://coveralls.io/github/VidaZing/logger_gem?branch=master) + VidaZing logging strategy using [TwP/logging](https://github.com/TwP/logging). Writes to rolling log files and the corresponding IO pipe. -* <span style="color:red">Red</span> timestamps: `logs/error.log` + stderr. -* <span style="color:blue">Blue</span> timestamps: `logs/build.log` + stdout. +* <img src="http://medyk.org/colors/ff8787.png" style="border: 1px solid black" width="20" height="20" /> timestamps for: `logs/error.log` + stderr. +* <img src="http://medyk.org/colors/87d7ff.png" style="border: 1px solid black" width="20" height="20" /> timestamps for: `logs/build.log` + stdout. 1. [**Installation**](#installation) 2. [**Usage**](#usage) ## Installation 1. In your `Gemfile`, add the `vidazing_logger` gem: ```ruby - gem 'vidazing_logger', '~> 0.1' + gem 'vidazing_logger', '~> 0.2' ``` 2. In your `shell`, run: ```ruby @@ -37,10 +42,23 @@ ### Gem ```ruby require 'vidazing_logger' -logger = VidazingLogger.logger("OPTIONAL_LOGGER_NAME") +# Easy +optional_name = "DearDiary" +optional_log_dir = 'logs' +logger = VidazingLogger.logger(optional_name, optional_log_dir) + +# Customized. See VidazingLogger::Logger#build +LoggerBuilder.build(name: @name) do |builder| + builder + .add_stdout + .add_build_log(log_dir: @log_dir) + .add_stderr + .add_error_log(log_dir: @log_dir) +end + ``` ### Binary `vidazing_logger` for all your stand alone shell logging needs. We should probably let you disable the `logs/` file logging... Moving along!