As you maybe know by yourself, sometimes you have to do tasks on a live production machine, via the rails console...
I usually start it with: bundle exec rails console -e production
But since its the production machine, I would like to log all in+outputs of the rails console to a file, f.e. to /home/sshuser/myproject/console_sessions/2016_09_09__14_33_33.txt
Anybody knows how to do this? I would like to start the logger atuomatically, but only if I run the console?
(I'm running Rails 3.2) Thanks!
Aucun commentaire:
Enregistrer un commentaire