Giter VIP home page Giter VIP logo

nextline-graphql's People

Contributors

dependabot[bot] avatar taisakuma avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nextline-graphql's Issues

stdout doesn't consistently show on (c)ontinue

I find that print statements don't consistently show in the web page stdout box if I run the script using the "continue" option. They do show if I step through the program line by line with "next" though.

This can be demonstrated by executing:

print('hello world')

with both the next and continue buttons.

Perhaps more dramatically with a loop of prints:

for i in range(100):
    print(i)

In this case I sometimes get 0-3 lines, but the remaining ~97 don't print. Expected output does show in the docker logs on the backend.

Use loguru for logging

I tried to switch from the Python standard logging to loguru. But I will need to do more work to complete it. I am working on the branch loguru.

The loguru readme shows how to send logging messages to loguru sinks. In nextline, this method doesn't correctly show the location of logging messages created in spawned processes. The locations all become nextline.utils.multiprocessing_logging:95, which is where nextline collects logging messages created in spawned processes.

loguru doesn't read the locations from the log records. It determines the locations from the frames in the main process.

On the other hand, loguru does support multiprocessing.. But it doesn't collect logging messages in the main process. It processes logging messages in each sub-process.

Consequently, to use loguru in nextline, we need to disable MultiprocessingLogging and use InterceptHandler in each spawned process.

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.