Giter Club home page Giter Club logo

Comments (4)

ivg avatar ivg commented on July 21, 2024

When you're writing a plugin, you shouldn't start the log service, as the host program will set the logging for you.

from cbat_tools.

fortunac avatar fortunac commented on July 21, 2024

Thanks Ivan! I was looking in the wrong directory for the log files. Is there also a way to have the logs printed to stdout?

from cbat_tools.

ivg avatar ivg commented on July 21, 2024

You can use the --log-dir parameter or the BAP_LOG_DIR environment variable to specify the location of the log file, e.g., bap . --log-dir=. will create a log file in the current folder.

While the Bap_main.init interface indeed allows specifying a formatter or channel as the looging output, the command line option itself is only accepting a directory. We can update the command line, and let it accept more options, including logging to stderr.

But, I honestly, don't see any reason to redirect it to a channel. You can always open the log file in emacs and enable the auto-revert-mode (if it is not enabled by default, it is a good idea to always use it). If you're not using emacs, I believe that all modern text editors are able to reload files automatically on change.

Finally, you can just use cat to output the log, e.g, bap ./exe <your-options> --log-dir=.; cat log

from cbat_tools.

fortunac avatar fortunac commented on July 21, 2024

Thanks a bunch!

from cbat_tools.

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.