Skip to content

Testing fluentd patch

Masahiro Nakagawa edited this page Aug 29, 2016 · 1 revision

This page shows how to test fluentd patches on your environment.

Build and install patched gem

Get patches and build gem.

$ git clone https://github.com/fluent/fluentd.git
$ cd fluentd
$ gem install bundler --no-document
$ git checkout -b branch-for-patch origin/branch-for-patch
# build patched gem. Generated gem is stored into under pkg directory
$ bundle exec rake build
# install
$ gem install pkg/fluentd-x.y.z.gem

Load patched code without gem installation

Using RUBYLIB environment variables, you can load patched code when fluentd starts.

Get patches:

$ git clone https://github.com/fluent/fluentd.git
$ cd fluentd
$ git checkout -b branch-for-patch origin/branch-for-patch

Use patched code:

$ RUBYLIB=/path/to/fluentd/lib fluentd -c ./fluentd.conf

If you clone the repository to /home/user/fluentd, actual command is RUBYLIB=/home/user/fluentd/lib fluentd -c ./fluentd.conf