{"id":21968474,"url":"https://github.com/robertgzr/rlog","last_synced_at":"2025-03-22T22:17:09.620Z","repository":{"id":100045008,"uuid":"121185126","full_name":"robertgzr/rlog","owner":"robertgzr","description":"yet another logging library. (not really - only if you must)","archived":false,"fork":false,"pushed_at":"2018-04-17T04:45:20.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T01:48:10.236Z","etag":null,"topics":["env","logging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertgzr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-02-12T01:17:18.000Z","updated_at":"2018-04-17T04:44:39.000Z","dependencies_parsed_at":"2023-05-11T22:30:26.159Z","dependency_job_id":null,"html_url":"https://github.com/robertgzr/rlog","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/robertgzr%2Frlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertgzr%2Frlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertgzr%2Frlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertgzr%2Frlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertgzr","download_url":"https://codeload.github.com/robertgzr/rlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245026042,"owners_count":20549073,"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":["env","logging"],"created_at":"2024-11-29T13:56:07.414Z","updated_at":"2025-03-22T22:17:09.587Z","avatar_url":"https://github.com/robertgzr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"rlog\n====\n\n_rust log or robert's log if you like ;)_  \nMostly for my own projects, with inspiration taken from https://crates.io/crates/env_logger.\n\nThis package implements [`github.com/apex/log.Handler`](https://github.com/apex/log/blob/master/logger.go#L54). \nIt also offers a subset of [`apex/log.Interface`](https://github.com/apex/log/blob/master/interface.go#L4) that can be used directly.\n\nThe environment variable `GO_LOG` can be used to set the log level. Like `env_logger` we support tuning it on a package\nbasis, e.g. `GO_LOG=warn,sub=debug` would only log warn/error/fatal messages with exception of in the `sub` package,\nwhere all logs get through.\n\n![preview](static/preview.png)\n\n## Usage\n\nReally simple, just import the package and use it:\n\n```\npackage main\n\nimport \"github.com/robertgzr/rlog\"\n\nfunc main() {\n    rlog.Info(\"hello world!\")\n}\n```\n\n### To integrate with apex/log:\n\n```\npackage main\n\nimport (\n    \"github.com/apex/log\"\n    \"github.com/robertgzr/rlog\"\n)\n\nfunc main() {\n    log.SetHandler(rlog.Default)\n    log.SetLevel(log.DebugLevel) // this overwrites the GO_LOG env\n\n    log.Debugf(\"%s is a string\", \"a string\")\n}\n```\n\n## Examples\n\nRun `GO_LOG=warn,subpkg=debug go run _example/main.go`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertgzr%2Frlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertgzr%2Frlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertgzr%2Frlog/lists"}