{"id":22753601,"url":"https://github.com/starryinternet/systemd-journal","last_synced_at":"2025-03-30T07:21:41.513Z","repository":{"id":70566367,"uuid":"303810960","full_name":"StarryInternet/systemd-journal","owner":"StarryInternet","description":"Rust Bindings to Systemd's sd-journal APIs","archived":false,"fork":false,"pushed_at":"2020-12-10T21:45:53.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-05T09:38:58.111Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarryInternet.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-13T19:39:48.000Z","updated_at":"2020-12-10T21:45:55.000Z","dependencies_parsed_at":"2023-03-31T11:22:19.413Z","dependency_job_id":null,"html_url":"https://github.com/StarryInternet/systemd-journal","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarryInternet%2Fsystemd-journal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarryInternet%2Fsystemd-journal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarryInternet%2Fsystemd-journal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarryInternet%2Fsystemd-journal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarryInternet","download_url":"https://codeload.github.com/StarryInternet/systemd-journal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246286939,"owners_count":20753163,"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-12-11T06:11:52.201Z","updated_at":"2025-03-30T07:21:41.473Z","avatar_url":"https://github.com/StarryInternet.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `systemd-journal`\n\nA simple, zero-dependency crate for working with Systemd's\n`sd_journal` API's.\n\n## Code examples\n\n`systemd_journal` provides an interface to the Systemd journal through\nthe `Journal` type.\n\n```rust\nlet jrn = systemd_journal::Journal::new();\n\nsystemd_journal::info!(jrn, \"Hello, world!\")?;\nif let Err(err) = something::dangerous() {\n  systemd_journal::error!(jrn, \"Oops: {}\", err)?;\n}\n\nlet mut reader = jrn.read()?;\nif let Some(mut entry) = reader.next()? {\n  if let Some(message) = entry.get(\"MESSAGE\")? {\n    println!(\"First journal entry: {:?}\", String::from_utf8_lossy(message));\n  }\n}\n```\n\n## Integration with `log`\n\n`systemd_journal` can be used to set up the global logger for the\npopular [log][docs_log] crate.\n\n[docs_log]: https://docs.rs/crate/log\n\n```rust\nfn main() {\n     systemd_journal::init_logger();\n     log::info!(\"Hello, world!\");\n}\n```\n\nNote: this requires enabling the `\"log\"` feature in `Cargo.toml`:\n\n```toml\n[dependencies.systemd-journal]\nversion = \"0.1\"\nfeatures = [\"log\"]\n```\n\n# License\n\nThis project is licensed under the MIT license (see the `LICENSE` file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarryinternet%2Fsystemd-journal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarryinternet%2Fsystemd-journal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarryinternet%2Fsystemd-journal/lists"}