Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Logs can get HUGE #6

Open
vanclute opened this issue Apr 23, 2017 · 2 comments
Open

Logs can get HUGE #6

vanclute opened this issue Apr 23, 2017 · 2 comments

Comments

@vanclute
Copy link

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. =)

@geek-at
Copy link
Owner

geek-at commented Apr 23, 2017

If you're not familiar with pull requests you can post the code here and I'll add it! Thanks for your support

@vanclute
Copy link
Author

vanclute commented Apr 23, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants