phptrader
phptrader copied to clipboard
Logs can get HUGE
I've modified my bash script so that it prepends today's date on the log file, so there is a new file generated for each day. Keeps the size manageable per-file for those who like to run it in the background 24/7. Would you like my change submitted? I've never contributed on github before so I'm not sure how to do so or what the best practices are, etc. But if you want me to "formally" contribute I'm happy to do so, could just use a few pointers. =)
If you're not familiar with pull requests you can post the code here and I'll add it! Thanks for your support
OK, just wanted to do whatever was most expedient. :) Here is my current complete bash script:
pkill -f "php trader.php"
today=$(date +'%m.%d.%Y')
nohup php trader.php watchdog >> ~/Documents/phptrader/log/$today.phptrader.log 2> ~/Documents/phptrader/log/$today.phptrader.err &
obviously the user just needs to change the paths to match their own directory structure, though I suppose that could be put into variables too if desired.