{"id":23636835,"url":"https://github.com/totobird-creations/loggerithm","last_synced_at":"2025-11-09T04:30:24.565Z","repository":{"id":60395279,"uuid":"542315529","full_name":"Totobird-Creations/loggerithm","owner":"Totobird-Creations","description":"A logging library for everyone.","archived":false,"fork":false,"pushed_at":"2022-10-01T16:13:34.000Z","size":16719,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T20:48:21.382Z","etag":null,"topics":["debugging","development-tools","library","log","logger","logging","rust","rust-crate","rust-library"],"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/Totobird-Creations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-27T22:41:59.000Z","updated_at":"2022-09-29T00:47:47.000Z","dependencies_parsed_at":"2022-09-29T01:20:25.891Z","dependency_job_id":null,"html_url":"https://github.com/Totobird-Creations/loggerithm","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/Totobird-Creations%2Floggerithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totobird-Creations%2Floggerithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totobird-Creations%2Floggerithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totobird-Creations%2Floggerithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Totobird-Creations","download_url":"https://codeload.github.com/Totobird-Creations/loggerithm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239565819,"owners_count":19660210,"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":["debugging","development-tools","library","log","logger","logging","rust","rust-crate","rust-library"],"created_at":"2024-12-28T06:14:58.316Z","updated_at":"2025-11-09T04:30:24.500Z","avatar_url":"https://github.com/Totobird-Creations.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loggerithm\n### Logging Library\n\n#### Installation\n```toml\n# Cargo.toml\n\n[dependencies]\nloggerithm  = \"1\"\nstatic_init = \"1.0.3\"\n```\n\n#### Preparation\nAt the top of each module that logs text, you must add one of the following:\n```rust\nuse loggerithm::logger;\n// This will tell the module to use the logger from the parent module.\n// If there is no parent module, it will use the default logger.\nlogger!(super);\n```\n```rust\nuse loggerithm::logger;\nlogger!(Logger::new()\n    // All of the settings here. See `src/logger.rs`.\n);\n```\n\n#### Basic Logging\nLoggerithm provides the standard logging levels, plus `TRACE` `NOTICE` `SUCCESS` and `FAILURE`.\nThe `log!` macro is similar to the `format!` macro, but takes a logging level as the first argument.\n```rust\nuse loggerithm::level::{TRACE, DEBUG, INFO, NOTICE, SUCCESS, FAILURE, WARN, ERROR, FATAL};\nuse loggerithm::{log, logger};\n\nlogger!(super);\n\nfn main() {\n    let x = 25;\n    log!(SUCCESS, \"The value of x is equal to {}.\", x);\n}\n```\nSee `examples/basic_logging.rs`.\n\n#### Custom Logging Levels\n```rust\nuse loggerithm::{logger, log_level, log};\nuse loggerithm::level::INFO;\n\nlogger!(super);\n\nlog_level!(MY_AMAZING_CUSTOM_LOGGING_LEVEL, LogLevel::new(30)\n    .formatted(|v| v.magenta().on_white().reverse())\n);\n\nfn main() {\n    log!(INFO, \"This example shows how to create a custom logging level and add formatting to it.\");\n    log!(MY_AMAZING_CUSTOM_LOGGING_LEVEL, \"This used my custom level, now with formatting!\");\n}\n```\nSee `examples/custom_level.rs` and `examples/custom_level_formatting.rs`.\n\n#### Custom Logger\n```rust\nuse loggerithm::{logger, log};\nuse loggerithm::level::{INFO, WARN};\n\nlogger!(Logger::new()\n    .set_min_severity(WARN::severity())\n    .add_target(|context| {\n        println!(\"{} | {} | {}\", context.time_local(), context.level_name_fp(), context.message())\n    })\n);\n\nfn main() {\n    log!(WARN, \"This is logged.\");\n    log!(INFO, \"This is not logged because it is below the minimum severity.\");\n}\n```\nSee `examples/custom_logger.rs`\n\n#### Modules\nSee `examples/module_tree.rs` for information on how loggers work across modules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotobird-creations%2Floggerithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotobird-creations%2Floggerithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotobird-creations%2Floggerithm/lists"}