From 9a2ece2a3a4790dee4c7be33410875386928413a Mon Sep 17 00:00:00 2001 From: aserafin Date: Thu, 16 Apr 2015 12:55:17 +0200 Subject: [PATCH] adjust readme for rails usage --- README.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2e803ed..2248f0b 100644 --- a/README.md +++ b/README.md @@ -16,24 +16,13 @@ Or install it yourself as: ## Basic Usage -### With Rack - -In your `config.ru`: - - ... - use GrapeLogging::Middleware::RequestLogger - ... - run Your::Application - -And then set logger formatter in your main api file +In your api file (somewhere on the top) logger.formatter = GrapeLogging::Formatters::Default.new - -### With Rails + use GrapeLogging::Middleware::RequestLogger, { logger: logger } - -## Other features +## Features ### Log Format @@ -45,7 +34,7 @@ If you prefer some other format I strongly encourage you to do pull request with ### Logging to file and STDOUT -You can to file and STDOUT at once, you just need to assign new logger +You can to file and STDOUT at the same time, you just need to assign new logger logger Logger.new GrapeLogging::MultiIO.new(STDOUT, File.open('path/to/your/logfile.log'), 'a'))