GithubHelp home page GithubHelp logo

runt18 / liblogfaf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookarchive/liblogfaf

0.0 2.0 0.0 162 KB

A library that logs messages using non-blocking UDP datagrams.

License: Other

Makefile 4.99% M4 10.44% C 71.95% Shell 12.62%

liblogfaf's Introduction

liblogfaf

Making syslog() not block

liblogfaf (faf stands for fire-and-forget) is a dynamic library that is designed to be LD_PRELOAD-ed while starting a process that uses openlog() & syslog() functions to send syslog messages. It overrides logging functions to make log messages sent as UDP datagrams instead of getting written to /dev/log (which can block). This is useful for processes that call syslog() as part of their main execution flow and can therefore be easily broken when /dev/log buffer gets full, for example when the process that is expected to read from it (usually system syslog daemon like rsyslog or syslog-ng) stops doing that.

Please note that liblogfaf should not be used in an environment where reliable log message delivery is required.

Requirements

liblogfaf is known to work on Linux, FreeBSD, and OS X.

Building and installing liblogfaf

  • Ensure you have libtool, autoconf, and automake installed;
  • run autoreconf -i to generate autoconf and automake files;
  • run ./configure. You can pass the '--enable-debug' option to build liblogfaf in debug mode;
  • make will build everything;
  • make install will install the library along with the logfaf script.

Using liblogfaf

The library comes with a logfaf script that can be used to start any binary with liblogfaf enabled. For example, if you run:

echo test | logfaf logger

You should see logger sending syslog UDP messages to 127.0.0.1:514

License

liblogfaf is BSD-licensed. We also provide an additional patent grant.

liblogfaf's People

Contributors

ezhuk avatar knyar avatar pallotron avatar sbz avatar yjh0502 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.