https://github.com/xerial/fluentd-standalone
Standalone fluentd server for Java/Scala
https://github.com/xerial/fluentd-standalone
Last synced: 9 months ago
JSON representation
Standalone fluentd server for Java/Scala
- Host: GitHub
- URL: https://github.com/xerial/fluentd-standalone
- Owner: xerial
- Created: 2013-12-16T04:35:38.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-07-29T18:37:49.000Z (over 6 years ago)
- Last Synced: 2025-04-02T04:56:53.940Z (10 months ago)
- Language: Shell
- Size: 1010 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
fluentd-standalone [](https://travis-ci.org/xerial/fluentd-standalone)  [](http://javadoc-badge.appspot.com/org.xerial/fluentd-standalone_2.12)
=========
Standalone fluentd (http://fluentd.org) server for Java and Scala.
This library launches a new fluentd server using a random port when fluentd is not started in the node.
Use cases:
* Running test codes that use fluentd (logger) in a build server (e.g., Travis CI, Jenkins, etc.), in which fluentd is not running.
## Usage (Java/Scala)
fluentd depends on some ruby modules. You need to install these dependencies first.
The simplest way is just install fluentd.
```
$ gem install fluentd -v 1.6.2
```
See also http://docs.fluentd.org/articles/quickstart.
### Maven
```xml
...
org.xerial
fluentd-standalone_2.12
1.2.6
...
```
### sbt
```
libraryDependencies += "org.xerial" %% "fluentd-standalone" % "1.6.2"
```
## Sample code
```java
import xerial.fluentd.FluentdStandalone;
FluentdStandalone s = new FluentdStandalone();
// Start new fluentd server
s.start();
// Send log messsages to fluentd
int port = s.port(); // fluentd port
// Terminate the fluentd
s.stop();
```
## For developers
```
$ git clone https://github.com/xerial/fluentd-standalone.git
$ cd fluentd-standalone
$ git submodule init # Only for the first time
$ git submodule update # Fetch fluentd
# Run tests
$ ./sbt test
```