Code Monkey home page Code Monkey logo

Comments (10)

yuanming-hu avatar yuanming-hu commented on May 17, 2024

I haven't found a cross-language logging framework for both C++ and python. Should I write one myself?

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

It seems that a basic logger in C++ with binding to python using pybind11 needs < 1000 LoC.

Compile time is an issue if we adopt something (heavy) header-only, as it will be included almost everywhere.

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

glog, spdlog, easyloggingpp turns out to be possible options.

I need indentation, however, to make logs more structured.

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

Another option is to first use one of them and then hack it to suit Taichi, if license permits.

BTW, it's time to replace printf s.

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

glog seems to be too heavy. Let's pick one among 'easyloggingpp' and spdlog.

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

https://stackoverflow.com/questions/2353430/how-can-i-print-to-the-console-in-color-in-a-cross-platform-manner

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

https://github.com/fmtlib/fmt

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

Another feature we want is that the logger output should be easily parsable, using python.
This would be helpful when we want to draw loss curves/convergence curves.

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

Let's use spdlog.

from taichi.

yuanming-hu avatar yuanming-hu commented on May 17, 2024

BTW, g3log is also awesome. I just like the bundled fmtlab with spdlog. Latency should not be an issue for taichi.

from taichi.

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.