{"id":13709932,"url":"https://github.com/pinax-network/substreams-sink-winston","last_synced_at":"2025-05-06T18:33:20.009Z","repository":{"id":65963541,"uuid":"603273050","full_name":"pinax-network/substreams-sink-winston","owner":"pinax-network","description":"Substreams Winston Logger sink module","archived":true,"fork":false,"pushed_at":"2023-02-20T19:49:49.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-03T06:02:36.426Z","etag":null,"topics":["pinax","substreams","thegraph","winston"],"latest_commit_sha":null,"homepage":"https://docs.rs/substreams-sink-winston","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/pinax-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2023-02-18T02:12:28.000Z","updated_at":"2023-05-16T00:50:23.000Z","dependencies_parsed_at":"2023-02-22T03:00:14.671Z","dependency_job_id":null,"html_url":"https://github.com/pinax-network/substreams-sink-winston","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":"0.040000000000000036","last_synced_commit":"02a8713c1c55ebd9eca09e66201bf75a3eae8262"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-winston","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-winston/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-winston/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-winston/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinax-network","download_url":"https://codeload.github.com/pinax-network/substreams-sink-winston/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252193708,"owners_count":21709346,"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":["pinax","substreams","thegraph","winston"],"created_at":"2024-08-02T23:00:48.704Z","updated_at":"2025-05-06T18:33:19.991Z","avatar_url":"https://github.com/pinax-network.png","language":"Rust","funding_links":[],"categories":["Substreams Sinks"],"sub_categories":["Firehose"],"readme":"# [`Substreams`](https://substreams.streamingfast.io/) [Winston](https://github.com/winstonjs/winston) `Logger` sink module\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/Github-substreams.winston-8da0cb?style=for-the-badge\u0026logo=github\" height=\"20\"\u003e](https://github.com/pinax-network/substreams-sink-winston)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/substreams-sink-winston.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/substreams-sink-winston)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-substreams.winston-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/substreams-sink-winston)\n[\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/pinax-network/substreams-sink-winston/ci.yml?branch=main\u0026style=for-the-badge\" height=\"20\"\u003e](https://github.com/pinax-network/substreams-sink-winston/actions?query=branch%3Amain)\n\n\u003e `substreams-sink-winston` is a tool that allows developers to pipe data extracted metrics from a blockchain into a standard Winston Logging message conforming to the severity ordering specified by [RFC5424](https://tools.ietf.org/html/rfc5424).\n\n## 📖 Documentation\n\n### https://docs.rs/substreams-sink-winston\n\n### Further resources\n\n- [Substreams documentation](https://substreams.streamingfast.io)\n- [Winston documentation](https://github.com/winstonjs/winston)\n\n## Related Sinks\n\n- [ ] **Substreams GoogleSheet** sink module\n- [ ] **Substreams CSV** sink module\n- [ ] **Substreams Telegram** sink module\n- [ ] **Substreams Discord** sink module\n\n## 🛠 Feature Roadmap\n\n### Create Logger\n- [x] service\n- [ ] defaultMeta\n\n### Logging\n- [x] **Emergency**: system is unusable\n- [x] **Alert**: action must be taken immediately\n- [x] **Critical**: critical conditions\n- [x] **Error**: error conditions\n- [x] **Warning**: warning conditions\n- [x] **Notice**: normal but significant condition\n- [x] **Informational**: informational messages\n- [x] **Debug**: debug-level messages\n\n### Filtering info Objects\n- [ ] ~ignorePrivate~\n- [ ] ~private~\n\n## Install\n\n```bash\n$ cargo add substreams-sink-winston\n```\n\n## Quickstart\n\n**Cargo.toml**\n\n```toml\n[dependencies]\nsubstreams = \"0.5\"\nsubstreams-sink-winston = \"0.1\"\n```\n\n**src/lib.rs**\n\n```rust\nuse substreams::errors::Error;\nuse substreams_sink_winston::{Logger, LoggerOperations};\n\n#[substreams::handlers::map]\nfn prom_out(\n    ... some stores ...\n) -\u003e Result\u003cLoggerOperations, Error\u003e {\n    // Initialize Winston Logger operations container\n    let mut log_ops: LoggerOperations = Default::default();\n\n    // Create Logger\n    // ==============\n    let mut logger = Logger::from(\"user-service\");\n\n    // Informational: informational messages\n    log_ops.push(logger.info(\"info message\"));\n\n    // Error: error conditions\n    log_ops.push(logger.error(\"error message\"));\n\n    // Include Metadata\n    let meta = Meta::from(vec!([\"key\", \"value\"]));\n    log_ops.push(logger.info(\"message\").with(meta));\n\n    Ok(log_ops)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-sink-winston","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinax-network%2Fsubstreams-sink-winston","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-sink-winston/lists"}