Git Product home page Git Product logo

pblog's Introduction

pblog - Protocol Buffer Log Library

alt text

pblog is a small, low overhead, structured logging library intended to be used to log firmware events. It is based on protobufs and uses the nanopb implementation in order to tackle object size concerns.

Dependencies

Runtime

Testing

  • c++ compiler

For ubuntu systems these can all be installed with apt

apt install make protobuf-compiler python-protobuf

Building

make NANOPB_DIR=<NANOPB_SOURCE_DIR> all

if you don't already have nanopb you can

git clone https://github.com/nanopb/nanopb
make -C nanopb/generator/proto
make NANOPB_DIR=nanopb all

Installing

make NANOPB_DIR=<NANOPB_SOURCE_DIR> PREFIX=/usr install

Testing

make NANOPB_DIR=<NANOPB_SOURCE_DIR> GTEST_DIR=<GTEST_DIR> check

if you don't already have gtest you can run

git clone https://github.com/google/googletest
pushd "googletest" >/dev/null
cmake \
  -DCMAKE_INSTALL_PREFIX="$(pwd)/googletest" \
  -DMAKE_BUILD_TYPE=Release \
  -DBUILD_GTEST=ON -DBUILD_GMOCK=OFF
make
make install
popd >/dev/null
make NANOPB_DIR=<NANOPB_SOURCE_DIR> GTEST_DIR=googletest check

Use in a project

If you would like to build pblog into your project, we provide a makefile mk/pblog.mk which can be included.

The makefile depends on the following variables:

  • NANOPB_DIR: The directory containing the source code for nanopb
  • PBLOG_BUILD_STATIC: Whether or not we should build a static pblog
  • PBLOG_BUILD_SHARED: Whether or not we should build a shared pblog

The makefile is guaranteed to export the following variables:

  • PBLOG_LIBRARIES: The targets from the enabled pblogging libraries
  • PBLOG_STATIC: The target for the static pblog library
  • PBLOG_SHARED: The target for the shared pblog library

pblog's People

Contributors

rlippert avatar wak-google avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pblog's Issues

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.