mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
Add file syncing to README example
This commit is contained in:
parent
41dcfb67ff
commit
3149cfddd6
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue