{"id":15571335,"url":"https://github.com/fishwaldo/go-logadapter","last_synced_at":"2026-04-27T02:32:45.553Z","repository":{"id":38316704,"uuid":"408875861","full_name":"Fishwaldo/go-logadapter","owner":"Fishwaldo","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-19T06:58:45.000Z","size":60,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T06:45:40.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Fishwaldo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-21T15:32:41.000Z","updated_at":"2022-01-06T07:21:09.000Z","dependencies_parsed_at":"2024-06-20T04:17:09.929Z","dependency_job_id":"4cdfaf14-fe55-4942-8827-ded1574c46dd","html_url":"https://github.com/Fishwaldo/go-logadapter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishwaldo%2Fgo-logadapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishwaldo%2Fgo-logadapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishwaldo%2Fgo-logadapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishwaldo%2Fgo-logadapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fishwaldo","download_url":"https://codeload.github.com/Fishwaldo/go-logadapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243224378,"owners_count":20256688,"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":[],"created_at":"2024-10-02T17:59:12.478Z","updated_at":"2025-12-26T02:54:05.861Z","avatar_url":"https://github.com/Fishwaldo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-LogAdapter\n\n[![codecov](https://codecov.io/gh/Fishwaldo/go-logadapter/branch/master/graph/badge.svg)](https://codecov.io/gh/Fishwaldo/go-logadapter)\n[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/Fishwaldo/go-logadapter)\n\nPackage go-logadapter allows you to use different Log Libraries in your\npackages/applications\n\nThis package just provides wrappers around different log libraries and\nallows the user of your library to use their preferred Logging Library\n\nIt implements common Logging Levels:\n\n```go\n* Trace\n* Debug\n* Info\n* Warn\n* Error\n* Fatal\n* Panic\n```\n\nIt also supports basic structured logging features, but specifing a key/value\npair using the With Statement.\n\n## Supported Logging Libraries\n\nlogadapter currently supports:\n\n```go\n* [std library logger](https://pkg.go.dev/log)\n* [logrus](https://github.com/sirupsen/logrus)\n* [zap](https://github.com/uber-go/zap)\n```\n\nAdding additional Logging Libraries is realatively straight forward by creating\na wrapper that implements the [Logger](https://pkg.go.dev/github.com/Fishwaldo/go-logadapter#Logger) Interface\n\n## Examples\n\n```golang\n/*\nMIT License\n\nCopyright (c) 2021 Justin Hammond\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\npackage main\n\nimport (\n\t\"github.com/Fishwaldo/go-logadapter\"\n\t\"github.com/Fishwaldo/go-logadapter/loggers/std\"\n)\n\ntype TestStruct struct {\n\tLogger logadapter.Logger\n}\n\nfunc (t *TestStruct) Init() {\n\ttemp := stdlogger.DefaultLogger()\n\ttemp.SetLevel(logadapter.LOG_TRACE)\n\tt.Logger = temp\n}\n\nfunc (t *TestStruct) LogSomething() {\n\tt.Logger.Info(\"This is a message\")\n}\n\nfunc (t *TestStruct) StructuredLog() {\n\tt.Logger.With(\"Test\", \"Message\").Trace(\"Hello %s\", string(\"world\"))\n}\n\nfunc main() {\n\tts := TestStruct{}\n\tts.Init()\n\tts.LogSomething()\n\tts.StructuredLog()\n\tts.Logger.Warn(\"This is outside the Structure\")\n}\n\n```\n\n---\nReadme created from Go doc with [goreadme](https://github.com/posener/goreadme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishwaldo%2Fgo-logadapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishwaldo%2Fgo-logadapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishwaldo%2Fgo-logadapter/lists"}