Merge pull request #11 from jtmarmon/patch-1

Add file syncing to README example
This commit is contained in:
Adrian Serafin 2015-09-02 16:06:02 +02:00
commit 9e247e0909

View file

@ -37,8 +37,10 @@ If you prefer some other format I strongly encourage you to do pull request with
### Logging to file and STDOUT ### Logging to file and STDOUT
You can to file and STDOUT at the same time, 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')) 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 ### Logging exceptions