-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentry alternative ? #43
Comments
I don't think I understand exactly the problem you're trying to fix. Watching the log output over long executions isn't usually the best way to go back and see the recent history, I'd use the strategy dashboard for that. Sentry and papertrail are useful to have around for debugging, if, e.g. your strategy had a failure at 3am and you want to go back and capture the exact log output that occurred just beforehand. If you want to leave gryphon running for a while without leaving a terminal open you could use start screen: |
I am actually trying to NOT have a terminal open to see what happened with my strategy at 3am. So I was wondering if there was a way to use some simple, text based, logging framework. This could be a setup easy to do for newcomers... better than watching the terminal and simple than setting up an external centralize logging service. What do you think ? |
It's a good feature idea to have a local log being written. I'm sure that wouldn't be hard to do. I get the concerns with sentry re: setup issues and also security. I haven't set it up myself in a while. For some reason I'm still not quite sure why you're trying to avoid the terminal in that 3am-issue scenario. Presumably you'd have to open it anyway if you're going in to debug an issue? Maybe you could message me on the slack and we could chat about it. In the meantime do you think you could do what you're trying to do with simple unix commands? Something like |
Actually I think I ll try to come up with a python logging configuration, in the strategy module, that works "good enough"... I ll report here when I get something interesting. |
I got something 'good enough' for now by doing this at the beginning of self.logger = logging.getLogger(__name__)
handler = logging.handlers.RotatingFileHandler('dynamic_market_making.' + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") + '.log')
formatter = logging.Formatter(
'%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
handler.setFormatter(formatter)
self.logger.addHandler(handler)
self.logger.setLevel(logging.DEBUG)
self.logger.debug("--Strategy Init--") so I guess we can close this issue. |
I am having issues setting up sentry (python envs, permission, postgres setup, etc.).
While I can eventually solve that, is there another possibility to store all logs, but maybe with a simpler, quicker setup ?
Like everything in a text file or something?
I m looking for a simple solution to start leaving gryphon running for some time without always having to watch the terminal... but I probably don't need the whole sentry heavyweight...
Thanks !
The text was updated successfully, but these errors were encountered: