{"id":18880097,"url":"https://github.com/antoninhrlt/rslog","last_synced_at":"2026-02-20T07:30:16.576Z","repository":{"id":150901490,"uuid":"485406331","full_name":"antoninhrlt/rslog","owner":"antoninhrlt","description":"Generate beautiful logs for your project. Rust library. Originally designed for a compiler/interpreter","archived":false,"fork":false,"pushed_at":"2022-04-27T21:46:00.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T03:13:13.979Z","etag":null,"topics":["compilers","library","logger","logging","rust","rust-crate"],"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/antoninhrlt.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":"2022-04-25T14:30:47.000Z","updated_at":"2022-05-24T15:45:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"3aa3f847-9c6b-47b6-8e0e-d06930c06899","html_url":"https://github.com/antoninhrlt/rslog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Frslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Frslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Frslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoninhrlt%2Frslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoninhrlt","download_url":"https://codeload.github.com/antoninhrlt/rslog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239841744,"owners_count":19705981,"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":["compilers","library","logger","logging","rust","rust-crate"],"created_at":"2024-11-08T06:41:48.616Z","updated_at":"2026-02-20T07:30:16.515Z","avatar_url":"https://github.com/antoninhrlt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rslog\nGenerate beautiful logs for your project. Rust library. Originally designed for \na compiler/interpreter\n\n## Install\nIn the \"Cargo.toml\" file of your project :\n```toml\n[dependencies]\nrslog = { git = \"https://github.com/antoninhrlt/rslog\" }\n```\n\n## Example\n```rust\n// Token type == \u0026str\n// code_line[2] is invalid  !\nlet code_line: Vec\u003c\u0026str\u003e = vec![\"fn\", \"main\", \"@\", \"{\", \"}\"];\n\nlet mut logger = Logger::new();\n\nlet logs = vec![\n    Log::info(\"Working directory : /Documents/somewhere\".to_string()),\n\n    // So, we throw an error\n    Log::new(\n        LogLevel::Error,\n        \"Unexpected token\".to_string(),\n        format!(\n            \"{}Token '{}' found but not expected\", \n            line_to_string::\u003c\u0026str\u003e(\u0026code_line, 3), // not index, but position\n            code_line[2]\n        ),\n    )\n    .add_cause(\u0026source_to_string(\"foo.rs\".to_string(), 0, 2)) // 1st line, 3rd token\n    .add_hint(format!(\"Add a parameters list after '{}'\", code_line[1]))\n];\n\nfor log in logs {\n    logger.add_log(log);\n}\n\n// Print all logs and kill the program process if at least one log is an error\nlogger.interpret();\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see imports\u003c/summary\u003e\n    \n```rust\nuse rslog::*;\nuse rslog::level::LogLevel;\nuse rslog::log::Log;\nuse rslog::logger::Logger;\n```\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoninhrlt%2Frslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoninhrlt%2Frslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoninhrlt%2Frslog/lists"}