All Projects → m-mizutani → libfluent

m-mizutani / libfluent

Licence: other
Library to send log as fluentd forwarding message

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to libfluent

Terraform Aws Elasticsearch
Terraform module to provision an Elasticsearch cluster with built-in integrations with Kibana and Logstash.
Stars: ✭ 137 (+470.83%)
Mutual labels:  fluentd
Fluent Logger Java
A structured logger for Fluentd (Java)
Stars: ✭ 186 (+675%)
Mutual labels:  fluentd
WebApiClient.Extensions
WebApiClient项目的第三方扩展:Autofac、DependencyInjection、HttpClientFactory、SteeltoeOSS.Discovery、MessagePack、Protobuf、Json-Rpc
Stars: ✭ 73 (+204.17%)
Mutual labels:  messagepack
Dagger
Dagger 是一个基于 Loki 的日志查询和管理系统,它是由达闼科技( CloudMinds )云团队的`大禹基础设施平台`派生出来的一个项目。Dagger 运行在 Loki 前端,具备日志查询、搜索,保存和下载等特性,适用于云原生场景下的容器日志管理场景。
Stars: ✭ 149 (+520.83%)
Mutual labels:  fluentd
Gofluent
(Not Maintained) Something acting like fluentd rewritten in Go.
Stars: ✭ 174 (+625%)
Mutual labels:  fluentd
Fluent Logger Ruby
A structured logger for Fluentd (Ruby)
Stars: ✭ 238 (+891.67%)
Mutual labels:  fluentd
Fluent Plugin Systemd
This is a fluentd input plugin. It reads logs from the systemd journal.
Stars: ✭ 124 (+416.67%)
Mutual labels:  fluentd
urlpack
Pure JavaScript toolkit for data URLs (MessagePack, Base58 and Base62)
Stars: ✭ 51 (+112.5%)
Mutual labels:  messagepack
Fluent Plugin Cloudwatch Logs
CloudWatch Logs Plugin for Fluentd
Stars: ✭ 179 (+645.83%)
Mutual labels:  fluentd
efk-stack-helm
Helm chart to deploy a working logging solution using the ElasticSearch - Fluentd - Kibana stack on Kubernetes
Stars: ✭ 51 (+112.5%)
Mutual labels:  fluentd
Fluent Plugin Rewrite Tag Filter
Fluentd Output filter plugin to rewrite tags that matches specified attribute.
Stars: ✭ 151 (+529.17%)
Mutual labels:  fluentd
Fluent Plugin Mongo
MongoDB input and output plugin for Fluentd
Stars: ✭ 163 (+579.17%)
Mutual labels:  fluentd
Fluent Bit
Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
Stars: ✭ 3,223 (+13329.17%)
Mutual labels:  fluentd
Pathivu
An efficient log ingestion and log aggregation system https://pathivu.io/
Stars: ✭ 146 (+508.33%)
Mutual labels:  fluentd
msgpack
🐴 Pure Pony implementation of the MessagePack serialization format. msgpack.org[Pony]
Stars: ✭ 31 (+29.17%)
Mutual labels:  messagepack
Aws Eks Kubernetes Masterclass
AWS EKS Kubernetes - Masterclass | DevOps, Microservices
Stars: ✭ 129 (+437.5%)
Mutual labels:  fluentd
Fluent Logger Node
A structured logger for Fluentd (Node.js)
Stars: ✭ 233 (+870.83%)
Mutual labels:  fluentd
ansible-role-fluentbit
Ansible role that install FluentBit
Stars: ✭ 18 (-25%)
Mutual labels:  fluentd
LogiAM
基于日志模板构建,采集任务动态管控、数据质量精确度量,一站式日志采集平台
Stars: ✭ 199 (+729.17%)
Mutual labels:  fluentd
fluentd-plugin-mdsd
Azure Linux monitoring agent (mdsd) output plugin for fluentd
Stars: ✭ 26 (+8.33%)
Mutual labels:  fluentd

libfluent

Fluentd library in C++. The library makes C++ program available to send logs to fluentd daemon directly.

#include <fluent.hpp>
	
int main(int argc, char *argv[]) {
  fluent::Logger *logger = new fluent::Logger();
  logger->new_forward("localhost", 24224);
	  
  // Emit log:
  //  tag: "tag.http"
  //  time: 1422315xxx (auto)
  //  data: {"url": "http://github.com", "port": 443}
  fluent::Message *msg = logger->retain_message("tag.http");
  msg->set("url", "http://github.com");
  msg->set("port", 443);
  logger->emit(msg);
  
  delete logger;
}

Functions

  • Support nested message such as {"a": {"b": {"c": 3}}}
  • Support array in message such as {"a": [1, 2, 3]}
  • Asynchronous emitting and buffering
  • Reconnect when disconnected
  • Exponential backoff for reconnect

Prerequisite

  • C++11 compiler
  • libmsgpack >= 0.5.9
  • ruby, fluentd, msgpack-ruby (for test)

Install

% cmake .
% make
% sudo make install

Examples

Nested Array/Map

Map

fluent::Message *msg = logger->retain_message("test.map");
// {}
msg->set("t1", "a");
// {"t1": "a"}
fluent::Message::Map *m1 = msg->retain_map("map1");
// {"t1": "a", "map1": {}}
m1->set("t2", "b");
// {"t2": "a", "map1": {"t2": "b"}}
fluent::Message::Map *m2 = m1->retain_map("map2");
// {"t1": "a", "map1": {"t2": "b", "map2":{}}}
m2->set("t2", "b");
// {"t2": "a", "map1": {"t2": "b", "map2":{"t2": "b"}}}

Array

fluent::Message *msg = logger->retain_message("test.array");
// {}
fluent::Message::Array *arr = msg->retain_array("arr1");
// {"arr1": []}
arr->push(1);
// {"arr1": [1]}
arr->push(2);
// {"arr1": [1, 2]}
fluent::Message::Map *map = arr->retain_map("map2");
// {"arr1": [1, 2, {}]}
map->set("t", "a");
// {"arr1": [1, 2, {"t": "a"}]}

Author

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].