{"id":17726955,"url":"https://github.com/fs02/logrus-filtered-formatter","last_synced_at":"2025-03-31T15:26:25.095Z","repository":{"id":57513123,"uuid":"105002747","full_name":"Fs02/logrus-filtered-formatter","owner":"Fs02","description":" Logrus JSON Formatter with filterable fields","archived":false,"fork":false,"pushed_at":"2018-02-28T05:46:50.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-21T01:45:58.766Z","etag":null,"topics":[],"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/Fs02.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":null,"security":null,"support":null}},"created_at":"2017-09-27T10:03:18.000Z","updated_at":"2018-12-01T15:50:13.000Z","dependencies_parsed_at":"2022-08-31T22:52:06.115Z","dependency_job_id":null,"html_url":"https://github.com/Fs02/logrus-filtered-formatter","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/Fs02%2Flogrus-filtered-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Flogrus-filtered-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Flogrus-filtered-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Flogrus-filtered-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fs02","download_url":"https://codeload.github.com/Fs02/logrus-filtered-formatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237547534,"owners_count":19327871,"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-25T17:22:14.809Z","updated_at":"2025-02-06T21:14:02.901Z","avatar_url":"https://github.com/Fs02.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logrus Filtered Formatter\nUse this formatter to log json with filtered fields\n\n## Usage\n```\npackage main\n\nimport (\n\t\"github.com/Fs02/logrus-filtered-formatter\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nfunc main() {\n\tlog := logrus.New()\n\tfields := []string{\n\t\t\"password\",\n\t\t\"email\",\n\t}\n\tlog.Formatter = filtered.New(fields, \u0026logrus.JSONFormatter{})\n\n\tlog.WithFields(logrus.Fields{\n\t\t\"password\": \"asdfasdf\",\n\t\t\"email\":    \"johndoe@gmail.com\",\n\t\t\"name\":     \"john doe\",\n\t}).Info(\"new user created\")\n}\n```\nOutput:\n```\n{\"email\":[FILTERED],\"level\":\"info\",\"msg\":\"new user created\",\"name\":\"john doe\",\"password\":[FILTERED],\"time\":\"2017-10-05T16:05:29+07:00\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffs02%2Flogrus-filtered-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffs02%2Flogrus-filtered-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffs02%2Flogrus-filtered-formatter/lists"}