{"id":34131515,"url":"https://github.com/secureworks/logger","last_synced_at":"2026-04-08T17:31:38.771Z","repository":{"id":38779727,"uuid":"448018494","full_name":"secureworks/logger","owner":"secureworks","description":"A unified logging interface for Golang that supports multiple libraries.","archived":false,"fork":false,"pushed_at":"2024-10-30T21:13:27.000Z","size":175,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-12-17T11:51:52.825Z","etag":null,"topics":["golang","golang-library","logger","logging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secureworks.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-14T15:38:59.000Z","updated_at":"2024-10-30T21:11:13.000Z","dependencies_parsed_at":"2024-06-18T21:34:24.527Z","dependency_job_id":"8cc614cf-418c-406d-8cd2-2a27f33e2550","html_url":"https://github.com/secureworks/logger","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/secureworks/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secureworks%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secureworks%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secureworks%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secureworks%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secureworks","download_url":"https://codeload.github.com/secureworks/logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secureworks%2Flogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31566754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["golang","golang-library","logger","logging"],"created_at":"2025-12-15T00:52:52.645Z","updated_at":"2026-04-08T17:31:38.751Z","avatar_url":"https://github.com/secureworks.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secureworks Unified Logging Library\n\n`secureworks/logger` is a unified interface that wraps popular logging\nlibraries such as [Logrus][logrus] and [Zerolog][zerolog]: _and that is just\nthe beginning!_\n\nThis is the logging library used in\n[SecureWorks Taegis™ XDR (Extended Detection and Response)][taegis-xdr] Cloud\nPlatform, and is suggested for use with the [Taegis Golang SDK][taegis-sdk].\n\n## Installation\n\nThis library is broken into submodules that are linked together. You may\ndownload them separately, but the easiest thing to do is import whichever\ndriver you want to use (`logrus`, `zerolog`, or `testlogger`), and these will\ninclude the dependencies you need:\n\n```\n$ go get -u github.com/secureworks/logger/logrus\n```\n\nIf you want the middleware you would also need:\n\n```\n$ go get -u github.com/secureworks/logger/middleware\n```\n\nAlternatively, if your project is using Go modules then, reference the driver\npackage(s) in a file's `import`:\n\n```go\nimport (\n\t// ...\n\t\"github.com/secureworks/logger/middleware\"\n\t_ \"github.com/secureworks/logger/zerolog\"\n)\n```\n\nYou may run any Go command and the toolchain will resolve and fetch the\nrequired modules automatically.\n\n## Usage\n\n[Documentation is available on pkg.go.dev][godocs]. You may also look at the\nexamples in the `logger` package.\n\n## FAQ\n\n- Why are there so many submodules / why do all the packages have `go.mod`s?\n    - We have broken the packages up in order to keep dependencies in line with the log implementations. If you want \n      `zerolog` you shouldn't also need `logrus`; if you want to write code that consumes the shared interface you \n      shouldn't need to depend on either implementation. \n- There are some packages with \"safe\" and \"unsafe\" versions of code. Why is this?\n    - *unsafe* refers to using [the Go standard library `unsafe`][unsafe], which allows us to step outside of Go's type-safety rules. This code is no more \"not safe\" than a typical C program.\n    - While we use the unsafe code (less type-safe) by default, this can be disabled by adding a `safe` or `!unsafe` build tag. This may be useful if you are building for an environment that does not allow unsafe (less type-safe) code.\n    - For `zerolog` and `logrus` the unsafe code is used for a big performance boost.\n    - For `zerolog` it also addresses a small behavior change in the `zerolog.Hook` interface. **[See this issue for more.](https://github.com/rs/zerolog/issues/408)**\n\n## License\n\nThis library is distributed under the [Apache-2.0 license][apache-2] found in\nthe [LICENSE](./LICENSE) file.\n\n### Dependencies\n\n| Library                                                                    | Purpose                         | License                                                          |\n|----------------------------------------------------------------------------|---------------------------------|------------------------------------------------------------------|\n| [`github.com/secureworks/errors`](https://github.com/secureworks/errors)   | Extracts error stack traces.    | [BSD 2-Clause](https://choosealicense.com/licenses/bsd-2-clause) |\n| [`github.com/rs/zerolog`](https://github.com/rs/zerolog)                   | Logger.                         | [MIT](https://choosealicense.com/licenses/mit/)                  |\n| [`github.com/sirupsen/logrus`](https://github.com/sirupsen/logrus)         | Logger.                         | [MIT](https://choosealicense.com/licenses/mit/)                  |\n\nAs well as any transitive dependencies of the above.\n\n\u003c!-- Links --\u003e\n\n[taegis-xdr]: https://www.secureworks.com/products/taegis/xdr\n[taegis-sdk]: https://github.com/secureworks/taegis-sdk-go\n[godocs]: https://pkg.go.dev/github.com/secureworks/logger\n[logrus]: https://github.com/sirupsen/logrus\n[zerolog]: https://github.com/rs/zerolog\n[apache-2]: https://choosealicense.com/licenses/apache-2.0/\n[unsafe]: https://pkg.go.dev/unsafe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecureworks%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecureworks%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecureworks%2Flogger/lists"}