Giter Site home page Giter Site logo

Comments (4)

tyarkoni avatar tyarkoni commented on May 17, 2024

Great idea! I won't have time to take this on for a couple of weeks, but would be very happy to consider PRs.

from transitions.

lulingar avatar lulingar commented on May 17, 2024

I would love to contribute, but in quick reading core.py I got a little overwhelmed since the code, despite being well written, is rather long. If you have a suggestion where I could add logging hooks safely, I would give it a shot.

from transitions.

tyarkoni avatar tyarkoni commented on May 17, 2024

Sure--let me get back to you after Friday. :)

from transitions.

tyarkoni avatar tyarkoni commented on May 17, 2024

Sorry @lulingar, just realized I never followed up on this. I just added very basic logging in a17617e. This could be improved in various ways (e.g., assigning all logged events to named constants, adding messages for other events, allowing writing to file, or adding metadata like timestamp and Machine instance to the logs). All logged events are at INFO level right now, and I haven't changed the default loglevel, so to output the logs to stdout, one just has to import the logger from the module and set its level appropriately before running. I.e.,

import logging
from transitions import logger
logger.setLevel(logging.INFO)

Then you should have a record of transitions, state changes, and fired callbacks.

I'm closing this for now, but feel free to re-open if any issues arise.

from transitions.

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.