From 3149cfddd6d8a5f6eeb7c4506c3f0f96e931e011 Mon Sep 17 00:00:00 2001 From: Jason Marmon Date: Tue, 1 Sep 2015 17:29:22 -0400 Subject: [PATCH] Add file syncing to README example --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 93b07c2..6925a8f 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,10 @@ 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 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')) + + log_file = File.open('path/to/your/logfile.log', 'a') + log_file.sync = true + logger Logger.new GrapeLogging::MultiIO.new(STDOUT, log_file) ### Logging exceptions