All Projects → cosmo0920 → fruently

cosmo0920 / fruently

Licence: MIT License
A yet another Fluentd logger for Rust. a.k.a. verification of Fluentd's forward protocol playground.

Programming Languages

rust
11053 projects
TeX
3793 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to fruently

fluent-logger-scala
A structured logger implementation in Scala.
Stars: ✭ 46 (+170.59%)
Mutual labels:  fluentd, fluentd-logger
bitnami-docker-fluentd
Bitnami Docker Image for Fluentd
Stars: ✭ 16 (-5.88%)
Mutual labels:  fluentd
fluent-plugin-anonymizer
Fluentd filter output plugin to anonymize records with MD5/SHA1/SHA256/SHA384/SHA512 algorithms. This data masking plugin protects privacy data such as ID, email, phone number, IPv4/IPv6 address and so on.
Stars: ✭ 52 (+205.88%)
Mutual labels:  fluentd
logwatch
日志采集工具
Stars: ✭ 22 (+29.41%)
Mutual labels:  fluentd
fluent-plugin-gcs
Google Cloud Storage output plugin for Fluentd.
Stars: ✭ 39 (+129.41%)
Mutual labels:  fluentd
fluent-plugin-http-pull
The input plugin of fluentd to pull log from rest api.
Stars: ✭ 19 (+11.76%)
Mutual labels:  fluentd
Laravel-FluentLogger
fluent logger for laravel (with Monolog handler for Fluentd)
Stars: ✭ 55 (+223.53%)
Mutual labels:  fluentd
fluent-plugin-windows-eventlog
Fluentd plugin to collect windows event logs
Stars: ✭ 27 (+58.82%)
Mutual labels:  fluentd
stackdriver-tools
Stackdriver Nozzle for Cloud Foundry Loggregator, Host Monitoring Agents BOSH Release
Stars: ✭ 22 (+29.41%)
Mutual labels:  fluentd
fluent-plugin-rabbitmq
Fluent input/output plugin for RabbitMQ.
Stars: ✭ 26 (+52.94%)
Mutual labels:  fluentd
fluentd-docs
This repository is deprecated. Go to fluentd-docs-gitbook repository.
Stars: ✭ 49 (+188.24%)
Mutual labels:  fluentd
fluent-forward-go
A high-performance Go client for Fluentd and Fluent Bit
Stars: ✭ 26 (+52.94%)
Mutual labels:  fluentd
macropower-analytics-panel
It's like Google Analytics, but for Grafana dashboards!
Stars: ✭ 16 (-5.88%)
Mutual labels:  fluentd
dns-collector
Aggregator, analyzer, transporter and logging for your DNS logs
Stars: ✭ 58 (+241.18%)
Mutual labels:  fluentd
fluent-bit-go-s3
[Deprecated] The predessor of fluent-bit output plugin for Amazon S3. https://aws.amazon.com/s3/
Stars: ✭ 34 (+100%)
Mutual labels:  fluentd
fluent-plugin-irc
No description or website provided.
Stars: ✭ 16 (-5.88%)
Mutual labels:  fluentd
fluent-plugin-twitter
Fluentd Input/Output plugin to process tweets with Twitter Streaming API.
Stars: ✭ 53 (+211.76%)
Mutual labels:  fluentd
fluentd-elastic-kibana
Working inital configuration for fluentd elastic and kibana
Stars: ✭ 40 (+135.29%)
Mutual labels:  fluentd
prometheus-labs
Example Docker Cluster for "Full Stack Monitoring and Notification with Prometheus and Grafana"
Stars: ✭ 38 (+123.53%)
Mutual labels:  fluentd
study
✏️ What I Studied
Stars: ✭ 14 (-17.65%)
Mutual labels:  fluentd

Fruently

Build Status Build status

Documentation

A yet another Fluentd logger for Rust. Any version newer than Rust 1.18.0 is supported.

Note

If you use this library in Windows, please install Visual Studio 2015 or 2017 and rust compiler which is targeted for MSVC API and its package manager, which is called cargo via rustup.rs.

And then, follow the below usage instructions.

Usage

Add this to your Cargo.toml:

[dependencies]
fruently = "~0.10.0"

and this to your crate root:

extern crate fruently;

Complete examples

Forwarding with JSON

extern crate fruently;
use fruently::fluent::Fluent;
use std::collections::HashMap;
use fruently::forwardable::JsonForwardable;

fn main() {
    let mut obj: HashMap<String, String> = HashMap::new();
    obj.insert("name".to_string(), "fruently".to_string());
    let fruently = Fluent::new("127.0.0.1:24224", "test");
    match fruently.post(&obj) {
        Err(e) => println!("{:?}", e),
        Ok(_) => return,
    }
}

Forwarding with msgpack

extern crate fruently;
use fruently::fluent::Fluent;
use std::collections::HashMap;
use fruently::forwardable::MsgpackForwardable;

fn main() {
    let mut obj: HashMap<String, String> = HashMap::new();
    obj.insert("name".to_string(), "fruently".to_string());
    let fruently = Fluent::new("127.0.0.1:24224", "test");
    match fruently.post(&obj) {
        Err(e) => println!("{:?}", e),
        Ok(_) => return,
    }
}

Forwarding asynchronously

Fruently does not have asynchronous API because Rust has std::thread::spawn function to make asynchronous API from synchronous one.

If you want to send records into Fluentd asynchronously, please consider using std::thread::spawn like: asynchronous example.

Backward compatibility

Using with Fluentd v0.12, you must specify time-as-integer feature flag:

[build-dependencies.fruently]
version = "~0.10.0"
features = ["time-as-integer"]

Related Articles

LICENSE

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].