{"id":19710021,"url":"https://github.com/fast/fasyslog","last_synced_at":"2025-05-07T17:06:19.538Z","repository":{"id":262309423,"uuid":"886439241","full_name":"fast/fasyslog","owner":"fast","description":"Syslog client written in Rust","archived":false,"fork":false,"pushed_at":"2025-03-06T09:01:32.000Z","size":62,"stargazers_count":16,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T00:48:08.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tisonkun"}},"created_at":"2024-11-11T01:10:04.000Z","updated_at":"2025-03-25T05:35:27.000Z","dependencies_parsed_at":"2024-11-11T19:15:49.164Z","dependency_job_id":"4381101d-ab27-43f4-a469-e670939ff881","html_url":"https://github.com/fast/fasyslog","commit_stats":null,"previous_names":["fast/fasyslog"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Ffasyslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Ffasyslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Ffasyslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Ffasyslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fast","download_url":"https://codeload.github.com/fast/fasyslog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902620,"owners_count":21822262,"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":[],"created_at":"2024-11-11T22:06:02.770Z","updated_at":"2025-05-07T17:06:19.527Z","avatar_url":"https://github.com/fast.png","language":"Rust","funding_links":["https://github.com/sponsors/tisonkun"],"categories":[],"sub_categories":[],"readme":"# Fasyslog: A fast syslog client written in Rust\n\n[![Crates.io][crates-badge]][crates-url]\n[![Documentation][docs-badge]][docs-url]\n[![MSRV 1.75][msrv-badge]](https://www.whatrustisit.com)\n[![Apache 2.0 licensed][license-badge]][license-url]\n[![Build Status][actions-badge]][actions-url]\n\n[crates-badge]: https://img.shields.io/crates/v/fasyslog.svg\n[crates-url]: https://crates.io/crates/fasyslog\n[docs-badge]: https://docs.rs/fasyslog/badge.svg\n[msrv-badge]: https://img.shields.io/badge/MSRV-1.75-green?logo=rust\n[docs-url]: https://docs.rs/fasyslog\n[license-badge]: https://img.shields.io/crates/l/fasyslog\n[license-url]: LICENSE\n[actions-badge]: https://github.com/fast/fasyslog/workflows/CI/badge.svg\n[actions-url]:https://github.com/fast/fasyslog/actions?query=workflow%3ACI\n\n## Description\n\nClient library written in Rust to send messages to a Syslog server. Support implementations:\n\n* RFC-3164 Formatter: [The BSD syslog Protocol](https://datatracker.ietf.org/doc/html/rfc3164)\n* RFC-5424 Formatter: [The Syslog Protocol](https://datatracker.ietf.org/doc/html/rfc5424)\n* `UdpSender`: [RFC 5426 - Transmission of Syslog Messages over UDP](https://datatracker.ietf.org/doc/html/rfc5426)\n* `TcpSender`: [RFC 6587 - Transmission of Syslog Messages over TCP](https://datatracker.ietf.org/doc/html/rfc6587)\n* `NativeTlsSender`: [RFC 5425 - Transport Layer Security (TLS) Transport Mapping for Syslog](https://datatracker.ietf.org/doc/html/rfc5425)\n  * This implementation is based on [`native-tls`](https://crates.io/crates/native-tls) and requires features `native-tls` turned on.\n* `RustlsSender`: [RFC 5425 - Transport Layer Security (TLS) Transport Mapping for Syslog](https://datatracker.ietf.org/doc/html/rfc5425)\n    * This implementation is based on [`rustls`](https://crates.io/crates/rustls) and requires features `rustls` turned on.\n* (unix only) Unix domain socket sender (datagram or stream)\n\n## Getting Started\n\nAdd `fasyslog` to your `Cargo.toml`:\n\n```shell\ncargo add fasyslog\n```\n\n```rust\nuse fasyslog::Severity;\n\nfn main() {\n    let mut sender = fasyslog::sender::tcp_well_known().unwrap();\n    let message = format!(\"Hello, fasyslog!\");\n    // send a message with RFC 3164 format\n    sender.send_rfc3164(Severity::ERROR, message).unwrap();\n    sender.flush().unwrap();\n\n    // send a message with RFC 5424 format\n    const EMPTY_MSGID: Option\u003c\u0026str\u003e = None;\n    const EMPTY_STRUCTURED_DATA: Vec\u003cfasyslog::SDElement\u003e = Vec::new();\n    sender.send_rfc5424(Severity::ERROR, EMPTY_MSGID, EMPTY_STRUCTURED_DATA, message).unwrap();\n    sender.flush().unwrap();\n}\n```\n\nIf you'd like to integrate with `log` crate, you can try the `logforth` example:\n\n```toml\n[dependencies]\nlog = { version = \"...\" }\nlogforth = { version = \"...\", features = [\"syslog\"] }\n```\n\n```rust\nuse logforth::append::syslog::SyslogBuilder;\n\nfn main() {\n    let (append, _guard) = SyslogBuilder::tcp_well_known().unwrap().build();\n\n    logforth::builder()\n        .dispatch(|d| d.filter(log::LevelFilter::Trace).append(append))\n        .apply();\n\n    log::info!(\"This log will be written to syslog.\");\n}\n```\n\n## Example\n\nCheck the [examples](examples) directory for more examples.\n\n## Documentation\n\nRead the online documents at https://docs.rs/fasyslog.\n\n## Minimum Supported Rust Version (MSRV)\n\nThis crate is built against the latest stable release, and its minimum supported rustc version is 1.75.0.\n\nThe policy is that the minimum Rust version required to use this crate can be increased in minor version updates. For example, if Fasyslog 1.0 requires Rust 1.20.0, then Fasyslog 1.0.z for all values of z will also require Rust 1.20.0 or newer. However, Fasyslog 1.y for y \u003e 0 may require a newer minimum version of Rust.\n\n## License\n\nThis project is licensed under [Apache License, Version 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffast%2Ffasyslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffast%2Ffasyslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffast%2Ffasyslog/lists"}