{"id":19710022,"url":"https://github.com/fast/logforth","last_synced_at":"2025-05-16T18:09:02.520Z","repository":{"id":251144993,"uuid":"836529701","full_name":"fast/logforth","owner":"fast","description":"A versatile and extensible logging implementation.","archived":false,"fork":false,"pushed_at":"2025-04-09T07:06:14.000Z","size":392,"stargazers_count":78,"open_issues_count":5,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T19:52:28.438Z","etag":null,"topics":["logging","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/logforth/","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":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2024-08-01T03:38:22.000Z","updated_at":"2025-04-10T07:17:18.000Z","dependencies_parsed_at":"2024-12-03T07:30:26.873Z","dependency_job_id":"7964a881-837f-4b40-936f-c69093d1251b","html_url":"https://github.com/fast/logforth","commit_stats":null,"previous_names":["tisonkun/logforth","fast/logforth"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Flogforth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Flogforth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Flogforth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fast%2Flogforth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fast","download_url":"https://codeload.github.com/fast/logforth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625507,"owners_count":21135513,"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":["logging","rust"],"created_at":"2024-11-11T22:06:02.879Z","updated_at":"2025-05-16T18:09:02.513Z","avatar_url":"https://github.com/fast.png","language":"Rust","funding_links":[],"categories":["Libraries"],"sub_categories":["Logging"],"readme":"# Logforth\n\n[![Crates.io][crates-badge]][crates-url]\n[![Documentation][docs-badge]][docs-url]\n[![MSRV 1.80][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/logforth.svg\n[crates-url]: https://crates.io/crates/logforth\n[docs-badge]: https://docs.rs/logforth/badge.svg\n[msrv-badge]: https://img.shields.io/badge/MSRV-1.80-green?logo=rust\n[docs-url]: https://docs.rs/logforth\n[license-badge]: https://img.shields.io/crates/l/logforth\n[license-url]: LICENSE\n[actions-badge]: https://github.com/fast/logforth/workflows/CI/badge.svg\n[actions-url]:https://github.com/fast/logforth/actions?query=workflow%3ACI\n\nLogforth is a flexible and easy-to-use logging framework for Rust applications. It allows you to configure multiple dispatches, filters, and appenders to customize your logging setup according to your needs.\n\n## Features\n\n- **Multiple Dispatches**: Configure different logging behaviors for different parts of your application.\n- **Flexible Filters**: Use built-in or custom filters to control which log records are processed.\n- **Various Appenders**: Output logs to stdout, stderr, files, or even send them to OpenTelemetry collectors.\n- **Custom Layouts**: Format log records using predefined layouts or create your own.\n\n## Getting Started\n\nAdd `log` and `logforth` to your `Cargo.toml`:\n\n```shell\ncargo add log\ncargo add logforth\n```\n\n## Simple Usage\n\nSet up a basic logger that outputs to stdout:\n\n```rust\nfn main() {\n    logforth::stdout().apply();\n\n    log::info!(\"This is an info message.\");\n    log::debug!(\"This debug message will not be printed by default.\");\n}\n```\n\n## Advanced Usage\n\nConfigure multiple dispatches with different filters and appenders:\n\n```rust\nuse logforth::append;\nuse log::LevelFilter;\n\nfn main() {\n    logforth::builder()\n        .dispatch(|d| d\n            .filter(LevelFilter::Error)\n            .append(append::Stderr::default()))\n        .dispatch(|d| d\n            .filter(LevelFilter::Info)\n            .append(append::Stdout::default()))\n        .apply();\n\n    log::error!(\"This error will be logged to stderr.\");\n    log::info!(\"This info will be logged to stdout.\");\n    log::debug!(\"This debug message will not be logged.\");\n}\n```\n\nRead more demos under the [examples](examples) directory.\n\n## Documentation\n\nRead the online documents at https://docs.rs/logforth.\n\n## Minimum Rust version policy\n\nThis crate is built against the latest stable release, and its minimum supported rustc version is 1.85.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 Logforth 1.0 requires Rust 1.60.0, then Logforth 1.0.z for all values of z will also require Rust 1.60.0 or newer. However, Logforth 1.y for y \u003e 0 may require a newer minimum version of Rust.\n\n## When to release version 1.0\n\nAfter one year of practicing the interfaces, if there are no further blockers, I'll release version 1.0. So consequently, it can be as early as 2025-08.\n\n### Stabilize targets\n\nTo release version 1.0, it's essential to declare what targets this crate wants to stabilize. Even after 1.0, it's helpful to distinguish different portions of this crate to allow unstable modules to make breaking changes to improve their quality, just as how rust-lang's stabilization mechanism works.\n\nBasically, this crate contains:\n\n* Fundamental logging APIs (Appender, Layout, Filter, Dispatch, Logger, etc.) MUST be stabilized before 1.0.\n* Basic layouts and filters (all current existing) SHOULD be stabilized before 1.0.\n* Basic appenders (Stdout, Stderr, RollingFile) SHOULD be stabilized before 1.0.\n* Advanced appenders (Fastrace, OpentelemetryLog, Syslog, etc.) to-be-determined how to stabilize them.\n\nGenerally, there are known usage for Fastrace and OpentelemetryLog, so we can confidently announce their stable version; others are still waiting for feedback.\n\n## License and Origin\n\nThis project is licensed under [Apache License, Version 2.0](LICENSE).\n\nThe name `Logforth` comes from an antonym to the [`Logback`](https://logback.qos.ch/) project, and may also be read as a homophone of \"log force\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffast%2Flogforth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffast%2Flogforth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffast%2Flogforth/lists"}