{"id":16645127,"url":"https://github.com/cosmo0920/fruently","last_synced_at":"2025-03-21T15:32:47.928Z","repository":{"id":57632017,"uuid":"54832807","full_name":"cosmo0920/fruently","owner":"cosmo0920","description":"A yet another Fluentd logger for Rust. a.k.a. verification of Fluentd's forward protocol playground.","archived":false,"fork":false,"pushed_at":"2021-03-29T02:04:21.000Z","size":1212,"stargazers_count":19,"open_issues_count":2,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-13T08:13:23.529Z","etag":null,"topics":["fluentd","fluentd-logger","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmo0920.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-27T14:41:25.000Z","updated_at":"2024-06-26T05:00:49.000Z","dependencies_parsed_at":"2022-09-04T19:20:38.968Z","dependency_job_id":null,"html_url":"https://github.com/cosmo0920/fruently","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo0920%2Ffruently","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo0920%2Ffruently/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo0920%2Ffruently/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmo0920%2Ffruently/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmo0920","download_url":"https://codeload.github.com/cosmo0920/fruently/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221816769,"owners_count":16885390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fluentd","fluentd-logger","rust"],"created_at":"2024-10-12T08:13:20.978Z","updated_at":"2024-10-28T10:26:09.504Z","avatar_url":"https://github.com/cosmo0920.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fruently\n===\n\n[![Build Status](https://travis-ci.org/cosmo0920/fruently.svg?branch=master)](https://travis-ci.org/cosmo0920/fruently)\n[![](http://meritbadge.herokuapp.com/fruently)](https://crates.io/crates/fruently)\n[![Build status](https://ci.appveyor.com/api/projects/status/4qybnaegbiqs0738/branch/master?svg=true)](https://ci.appveyor.com/project/cosmo0920/fruently/branch/master)\n\n[Documentation](https://docs.rs/fruently/0.10.0/fruently/)\n\nA yet another Fluentd logger for Rust.\nAny version newer than Rust 1.18.0 is supported.\n\n##### Note\n\nIf 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](https://www.rustup.rs/).\n\nAnd then, follow the below usage instructions.\n\n### Usage\n\nAdd this to your Cargo.toml:\n\n```toml\n[dependencies]\nfruently = \"~0.10.0\"\n```\n\nand this to your crate root:\n\n```rust,ignore\nextern crate fruently;\n```\n\n#### Complete examples\n\n#### Forwarding with JSON\n\n```rust\nextern crate fruently;\nuse fruently::fluent::Fluent;\nuse std::collections::HashMap;\nuse fruently::forwardable::JsonForwardable;\n\nfn main() {\n    let mut obj: HashMap\u003cString, String\u003e = HashMap::new();\n    obj.insert(\"name\".to_string(), \"fruently\".to_string());\n    let fruently = Fluent::new(\"127.0.0.1:24224\", \"test\");\n    match fruently.post(\u0026obj) {\n        Err(e) =\u003e println!(\"{:?}\", e),\n        Ok(_) =\u003e return,\n    }\n}\n```\n\n#### Forwarding with msgpack\n\n```rust\nextern crate fruently;\nuse fruently::fluent::Fluent;\nuse std::collections::HashMap;\nuse fruently::forwardable::MsgpackForwardable;\n\nfn main() {\n    let mut obj: HashMap\u003cString, String\u003e = HashMap::new();\n    obj.insert(\"name\".to_string(), \"fruently\".to_string());\n    let fruently = Fluent::new(\"127.0.0.1:24224\", \"test\");\n    match fruently.post(\u0026obj) {\n        Err(e) =\u003e println!(\"{:?}\", e),\n        Ok(_) =\u003e return,\n    }\n}\n```\n\n#### Forwarding asynchronously\n\nFruently does not have asynchronous API because Rust has `std::thread::spawn` function to make asynchronous API from synchronous one.\n\nIf you want to send records into Fluentd asynchronously, please consider using `std::thread::spawn` like: [asynchronous example](examples/thread.rs).\n\n### Backward compatibility\n\nUsing with Fluentd v0.12, you must specify `time-as-integer` feature flag:\n\n```toml\n[build-dependencies.fruently]\nversion = \"~0.10.0\"\nfeatures = [\"time-as-integer\"]\n```\n\n### Related Articles\n\n* EventTime: http://www.clear-code.com/blog/2017/5/24.html (ja)\n* Fluent Logger Reliability: http://www.clear-code.com/blog/2017/4/28.html (ja)\n* Fundamentals: http://www.clear-code.com/blog/2016/4/22.html (ja)\n\n### LICENSE\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmo0920%2Ffruently","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmo0920%2Ffruently","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmo0920%2Ffruently/lists"}