{"id":16767397,"url":"https://github.com/vardius/golog","last_synced_at":"2025-04-10T19:13:16.072Z","repository":{"id":57481376,"uuid":"63586580","full_name":"vardius/golog","owner":"vardius","description":"Go logger","archived":false,"fork":false,"pushed_at":"2021-07-09T08:12:48.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T16:55:55.637Z","etag":null,"topics":["logger","logging","logging-library"],"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/vardius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["vardius"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-07-18T08:59:16.000Z","updated_at":"2022-01-04T09:56:32.000Z","dependencies_parsed_at":"2022-09-26T22:11:36.876Z","dependency_job_id":null,"html_url":"https://github.com/vardius/golog","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vardius%2Fgolog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vardius%2Fgolog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vardius%2Fgolog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vardius%2Fgolog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vardius","download_url":"https://codeload.github.com/vardius/golog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248280185,"owners_count":21077411,"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":["logger","logging","logging-library"],"created_at":"2024-10-13T06:09:04.142Z","updated_at":"2025-04-10T19:13:16.047Z","avatar_url":"https://github.com/vardius.png","language":"Go","funding_links":["https://github.com/sponsors/vardius"],"categories":[],"sub_categories":[],"readme":"📟 golog\n================\n[![Build Status](https://travis-ci.org/vardius/golog.svg?branch=master)](https://travis-ci.org/vardius/golog)\n[![Go Report Card](https://goreportcard.com/badge/github.com/vardius/golog)](https://goreportcard.com/report/github.com/vardius/golog)\n[![codecov](https://codecov.io/gh/vardius/golog/branch/master/graph/badge.svg)](https://codecov.io/gh/vardius/golog)\n[![](https://godoc.org/github.com/vardius/golog?status.svg)](https://pkg.go.dev/github.com/vardius/golog)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/vardius/golog/blob/master/LICENSE.md)\n\n\u003cimg align=\"right\" height=\"180px\" src=\"https://github.com/vardius/gorouter/blob/master/website/src/static/img/logo.png?raw=true\" alt=\"logo\" /\u003e\n\ngolog - Logger\n\n📖 ABOUT\n==================================================\nContributors:\n\n* [Rafał Lorenz](http://rafallorenz.com)\n\nWant to contribute ? Feel free to send pull requests!\n\nHave problems, bugs, feature ideas?\nWe are using the github [issue tracker](https://github.com/vardius/golog/issues) to manage them.\n\n## 📚 Documentation\n\nFor __examples__ **visit [godoc#pkg-examples](http://godoc.org/github.com/vardius/golog#pkg-examples)**\n\nFor **GoDoc** reference, **visit [pkg.go.dev](https://pkg.go.dev/github.com/vardius/golog)**\n\n🚏 HOW TO USE\n==================================================\n\n## 🏫 Basic example\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"context\"\n    \n    \"github.com/vardius/golog\"\n)\n\nfunc main() {\n    ctx := context.Background()\n    logger := golog.New()\n    \n    logger.Debug(ctx context.Context, fmt.Sprintf(\"Hello %s!\", \"you\"))\n}\n```\n\n## 📦 As a package\n```go\npackage mylogger\n\nimport (\n    \"context\"\n    \n    \"github.com/vardius/golog\"\n)\n\nvar Logger golog.Logger\n\nfunc SetFlags(flag int) {\n    Logger.SetFlags(flag)\n}\n\nfunc SetVerbosity(verbosity golog.Verbose) {\n    Logger.SetVerbosity(verbosity)\n}\n\nfunc Debug(ctx context.Context, v string) {\n    Logger.Debug(ctx, v)\n}\n\nfunc Info(ctx context.Context, v string) {\n    Logger.Info(ctx, v)\n}\n\nfunc Warning(ctx context.Context, v string) {\n    Logger.Warning(ctx, v)\n}\n\nfunc Error(ctx context.Context, v string) {\n    Logger.Error(ctx, v)\n}\n\nfunc Critical(ctx context.Context, v string) {\n\tLogger.Critical(ctx, v)\n}\n\nfunc Fatal(ctx context.Context, v string) {\n\tLogger.Fatal(ctx, v)\n}\n\nfunc init() {\n    Logger = golog.New()\n}\n```\nusage:\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \n    \"mylogger\"\n)\n\nfunc main() {\n    mylogger.Debug(ctx context.Context, fmt.Sprintf(\"Hello %s!\", \"you\"))\n}\n```\n\n📜 [License](LICENSE.md)\n-------\n\nThis package is released under the MIT license. See the complete license in the package\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvardius%2Fgolog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvardius%2Fgolog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvardius%2Fgolog/lists"}