{"id":18894575,"url":"https://github.com/ravsii/loglevels","last_synced_at":"2026-01-12T00:38:51.665Z","repository":{"id":57655356,"uuid":"454519460","full_name":"ravsii/LogLevels","owner":"ravsii","description":"Tiny Go library for logging levels","archived":false,"fork":false,"pushed_at":"2022-02-05T14:25:06.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T06:33:44.603Z","etag":null,"topics":["levels","log","logger","logging","tiny"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ravsii.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}},"created_at":"2022-02-01T19:18:05.000Z","updated_at":"2022-02-05T14:25:10.000Z","dependencies_parsed_at":"2022-09-01T01:40:47.922Z","dependency_job_id":null,"html_url":"https://github.com/ravsii/LogLevels","commit_stats":null,"previous_names":["ravcii/loglevels"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravsii/LogLevels","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravsii%2FLogLevels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravsii%2FLogLevels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravsii%2FLogLevels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravsii%2FLogLevels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravsii","download_url":"https://codeload.github.com/ravsii/LogLevels/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravsii%2FLogLevels/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28329806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["levels","log","logger","logging","tiny"],"created_at":"2024-11-08T08:23:15.971Z","updated_at":"2026-01-12T00:38:51.652Z","avatar_url":"https://github.com/ravsii.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogLevels\n\n`LogLevels` is a simple package for implementing logging levels inspired by Python default logging package.\n\nIt's for those who think that using [Logrus]([https://github.com/sirupsen/logrus]) for their project just for splitting DEBUG/INFO logs is a bit of an overkill.\nThis package doesn't implement `Fatal` and `Panic` functions\n## Installation\n\n```\ngo get github.com/Ravcii/LogLevels\n```\n\n## Importing\n\n```go\nimport log \"github.com/Ravcii/LogLevels\"\n```\n\n## Logging levels\n\nThere are 4 logging levels\n\n* `log.DEBUG` is the lowest logging level. Only devs should really care about it\n* `log.INFO` is a logging level for what's outputting what's happening right now in your code, but not as detailed as DEBUG\n* `log.WARNING` is a logging level at which your program still runs but you want to at least wanna check what happened\n* `log.ERROR` is a logging level at which something would likely crash your program\n\n## Usage\n\n### Levels\nUse `SetLevel(level)` for settings a level.\n\nUse `Level()` for getting a current level.\n\n### Log Functions\nThere are 8 functions, 2 per each level for normal string and formatted string:\n* `Debug()`, `Debugf()`\n* `Info()`, `Infof()`\n* `Warning()`, `Warningf()`\n* `Error()`, `Errorf()`\n\n ### Changing default settings, changing writer, etc...\n\nYou can use `Logger()` to get default logger from the original go's `log` package.\n\nExample:\n```go\nvar buf bytes.Buffer\n\nlog.Logger().SetWriter(\u0026buf)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravsii%2Floglevels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravsii%2Floglevels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravsii%2Floglevels/lists"}