Add file syncing to README example

This commit is contained in:
Jason Marmon 2015-09-01 17:29:22 -04:00
parent 41dcfb67ff
commit 3149cfddd6

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
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