Skip to content

matwey/logfanoutd

Repository files navigation

logfanoutd

logfanoutd is a simple HTTP server able to handle range requests as per RFC7233 powered by libmicrohttpd library. Conventional text log file can be thought as of persistent message queue and then HTTP range requests can be used as mechanism of message consumption relying on client performance. Range requests allow the multiple remote clients to fetch existing log file as well as to continuously request newly appended data with the pace which the client wishes. Using libmicrohttpd allows to achieve low resource requirements for the server application.

Building

Following components are required to build logfanoutd:

  • cmake - cross-platform open-source build system;
  • libmicrohttpd - small C library to run an HTTP server;
  • check - unit testing framework for C;
  • libcurl - multiprotocol file transfer library.

Then, the application can be compiled as the following:

mkdir build && cd build
cmake ..
make all test

Running

To run the server, the following options are available

  • --port - specify port number to listen on
  • --root_dir - specify root directory to serve
  • --alias=VPATH:PPATH - alias physical path PPATH to virtual VPATH
  • --listen - specify addr to listen on (optional)
logfanout --port=8014 --root_dir=/var/log/remote

Or listen on loopback interface only:

logfanout --listen=127.0.0.1 --port=8014 --root_dir=/var/log/remote

Development

Any pull-requests to the project are always welcome.

About

Simple log fanout HTTP server

Resources

License

Stars

Watchers

Forks

Packages

No packages published