Git Product home page Git Product logo

lldb-fmtlog's Introduction

lldb-fmtlog

LLDB Commands for manipulating formatters logging facility.

Installation

This repository is meant to be a submodule of lldb-bundle, look there for installation instructions.

You also have an option to clone this repository and add the following line into your ~/.lldbinit file:

command script import <path-to-repository>/lldb_fmtlog

Formatters Logging Facility

LLDB custom type formatters normally use logging, as demonstrated in the following example:

logger = lldb.formatters.Logger.Logger()
logger.write('something interesting')

By default, such logging messages are discarded.

If you are either developing an LLDB formatter for a type, or analyzing a behavior of an existing formatter, you may find it helpful to quickly enable logging output with a provided command.

Commands

help fmtlog

Display a list of subcommands.

fmtlog enable [-h] [-l <level>] [-o <file>]

Enable formatters logging at the specified level, and write logging messages to the specified file.

Possible level values are:

  • fast: use buffered logging.
  • auto-flush: use unbuffered logging; slow but more reliable.
  • caller-info: use unbuffered logging, and output a name of a caller function.
fmtlog disable [-h]

Disable formatters logging.

fmtlog state [-h]

Display the state of the logging facility.

Contributing

Feel free to file an issue, or send a pull request.

Before making your changes, you need to establish a development environment. As this repository is meant to be a submodule of lldb-bundle, look there for creating the Python virtual environment suitable for developing with LLDB.

Once you activated the virtual environment, run:

make init

to install the required development tools.

Use your editor or IDE to make your changes. Add relevant tests. To prepare for a submission, run:

make format
make lint
make test

Fix lint issues and test failures.

Repeat until everything is OK, then open a pull request.

Thanks!

lldb-fmtlog's People

Contributors

anpol avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.