Coder Social home page Coder Social logo

Sentry alternative ? about gryphon HOT 5 OPEN

garethdmm avatar garethdmm commented on August 30, 2024
Sentry alternative ?

from gryphon.

Comments (5)

garethdmm avatar garethdmm commented on August 30, 2024

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 screen (manual page). I think you'll still have to leave your computer awake but otherwise this might satisfy your short term goal.

start screen: screen
leave screen: ctrl-a d
re-open screen: screen -DR

from gryphon.

asmodehn avatar asmodehn commented on August 30, 2024

I am actually trying to NOT have a terminal open to see what happened with my strategy at 3am.
Sentry setup has been painful (I hit a bunch of issues and the fix is not always obvious) that I eventually gave up (for now at least).
I would appreciate if my log doesn't go travel around the web, and I would prefer to not depend on proprietary software/format/structure to host this kind of critical knowledge.

So I was wondering if there was a way to use some simple, text based, logging framework.
For example, what do I need to do if I just want my strategy log into my local syslog ?

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 ?

from gryphon.

garethdmm avatar garethdmm commented on August 30, 2024

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 gryphon-exec strategy strategy.py > strategy.log or something like that? That would send all the console output to a file. If you wanted to keep the execution visible in your terminal you could then use tail -f strategy.log, and use something similar to look at the most recent issues

from gryphon.

asmodehn avatar asmodehn commented on August 30, 2024

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.

from gryphon.

asmodehn avatar asmodehn commented on August 30, 2024

I got something 'good enough' for now by doing this at the beginning of my strategy.__init__ :

        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.
Should we make one feature request for syslog handler integration ?

from gryphon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.