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.
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
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 pathPPATH
to virtualVPATH
--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
Any pull-requests to the project are always welcome.