{"id":22747517,"url":"https://github.com/resurfaceio/logger-go","last_synced_at":"2025-04-14T11:40:34.754Z","repository":{"id":41047803,"uuid":"299141092","full_name":"resurfaceio/logger-go","owner":"resurfaceio","description":"Log API calls with Go","archived":false,"fork":false,"pushed_at":"2024-06-17T18:51:49.000Z","size":3843,"stargazers_count":22,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2025-03-28T00:45:07.759Z","etag":null,"topics":["api-logger","golang","http-logger","logger-go"],"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/resurfaceio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2020-09-27T23:52:02.000Z","updated_at":"2024-06-17T18:51:52.000Z","dependencies_parsed_at":"2024-06-18T22:59:02.166Z","dependency_job_id":"fe2a43d7-3c08-47cf-8570-3db57f6ae78c","html_url":"https://github.com/resurfaceio/logger-go","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Flogger-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Flogger-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Flogger-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Flogger-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resurfaceio","download_url":"https://codeload.github.com/resurfaceio/logger-go/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248874209,"owners_count":21175791,"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":["api-logger","golang","http-logger","logger-go"],"created_at":"2024-12-11T03:16:13.153Z","updated_at":"2025-04-14T11:40:34.732Z","avatar_url":"https://github.com/resurfaceio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# resurfaceio-logger-go\nEasily log API requests and responses to your own \u003ca href=\"https://resurface.io\"\u003esecurity data lake\u003c/a\u003e.\n\n[![Go project version](https://badge.fury.io/go/github.com%2Fresurfaceio%2Flogger-go.svg)](https://badge.fury.io/go/github.com%2Fresurfaceio%2Flogger-go)\n[![CodeFactor](https://www.codefactor.io/repository/github/resurfaceio/logger-go/badge)](https://www.codefactor.io/repository/github/resurfaceio/logger-go)\n[![License](https://img.shields.io/github/license/resurfaceio/logger-go)](https://github.com/resurfaceio/logger-go/blob/master/LICENSE)\n[![Contributing](https://img.shields.io/badge/contributions-welcome-green.svg)](https://github.com/resurfaceio/logger-go/blob/master/CONTRIBUTING.md)\n\n## Contents\n\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"#dependencies\"\u003eDependencies\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#logging_from_mux\"\u003eLogging from gorilla/mux\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#privacy\"\u003eProtecting User Privacy\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ca name=\"dependencies\"/\u003e\n\n## Dependencies\n\nRequires go 1.18 or later.\n\n\u003ca name=\"installation\"/\u003e\n\n## Installation\n\nRun this command in the same directory as your project's `go.mod` and `go.sum` files:\n\n```\ngo get github.com/resurfaceio/logger-go/v3\n```\n\n\u003ca name=\"logging_from_mux\"/\u003e\n\n## Logging from gorilla/mux\n\n```golang\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/resurfaceio/logger-go/v3\" //\u003c----- 1\n)\n\n\nfunc main() {\n\trouter := mux.NewRouter()\n  \n\toptions := logger.Options{ //\u003c----- 2\n\t\tRules:   \"include_debug\\n\",\n\t\tUrl:     \"http://localhost:7701/message\",\n\t\tEnabled: true,\n\t\tQueue:   nil,\n\t}\n\n\thttpLoggerForMux, err := logger.NewHttpLoggerForMuxOptions(options) //\u003c----- 3\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\trouter.Use(httpLoggerForMux.LogData) //\u003c----- 4\n\n\tlog.Fatal(http.ListenAndServe(\":5000\", router))\n}\n```\n\n\u003ca name=\"privacy\"/\u003e\n\n## Protecting User Privacy\n\nLoggers always have an active set of \u003ca href=\"https://resurface.io/rules.html\"\u003erules\u003c/a\u003e that control what data is logged\nand how sensitive data is masked. All of the examples above apply a predefined set of rules, `include_debug`,\nbut logging rules are easily customized to meet the needs of any application.\n\n\u003ca href=\"https://resurface.io/rules.html\"\u003eLogging rules documentation\u003c/a\u003e\n\n---\n\u003csmall\u003e\u0026copy; 2016-2024 \u003ca href=\"https://resurface.io\"\u003eGraylog, Inc.\u003c/a\u003e\u003c/small\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresurfaceio%2Flogger-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresurfaceio%2Flogger-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresurfaceio%2Flogger-go/lists"}