{"id":17801793,"url":"https://github.com/xissy/logrus","last_synced_at":"2025-08-27T01:54:40.308Z","repository":{"id":57594808,"uuid":"127486913","full_name":"xissy/logrus","owner":"xissy","description":"logrus JSONFormatter for Apex Up","archived":false,"fork":false,"pushed_at":"2018-06-18T02:53:05.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T18:53:51.468Z","etag":null,"topics":["apex-up","grpc-middleware","logrus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xissy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-31T01:05:08.000Z","updated_at":"2018-06-18T02:53:06.000Z","dependencies_parsed_at":"2022-09-26T20:31:25.644Z","dependency_job_id":null,"html_url":"https://github.com/xissy/logrus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xissy%2Flogrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xissy%2Flogrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xissy%2Flogrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xissy%2Flogrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xissy","download_url":"https://codeload.github.com/xissy/logrus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246752635,"owners_count":20827987,"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":["apex-up","grpc-middleware","logrus"],"created_at":"2024-10-27T12:39:39.638Z","updated_at":"2025-04-02T04:15:17.191Z","avatar_url":"https://github.com/xissy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logrus\n\n## JSONFormatter for Apex Up\n\n* Original JSONFormatter\n\n```json\n{\n  \"grpc.code\":\"OK\",\n  \"grpc.method\":\"LogIn\",\n  \"grpc.service\":\"pb.taeho.account.AccountService\",\n  \"grpc.start_time\":\"2018-03-30T18:02:25-07:00\",\n  \"grpc.time_ms\":3.615,\n  \"level\":\"info\",\n  \"msg\":\"finished unary call with code OK\",\n  \"peer.address\":\"127.0.0.1:62832\",\n  \"span.kind\":\"server\",\n  \"system\":\"grpc\"\n}\n```\n\n* Apex Up JSONFormatter\n\n```json\n{\n  \"fields\":{\n    \"grpc_code\":\"OK\",\n    \"grpc_method\":\"LogIn\",\n    \"grpc_service\":\"pb.taeho.account.AccountService\",\n    \"grpc_start_time\":\"2018-03-30T18:02:25-07:00\",\n    \"grpc_time_ms\":3.615,\n    \"peer_address\":\"127.0.0.1:62832\",\n    \"span_kind\":\"server\",\n    \"system\":\"grpc\"\n  },\n  \"level\":\"info\",\n  \"message\":\"finished unary call with code OK\"\n}\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n    log \"github.com/sirupsen/logrus\"\n    \"github.com/xissy/logrus\"\n)\n\nfunc main() {\n    log.SetOutput(os.Stdout)\n    log.SetFormatter(\u0026logrus.ApexUpJSONFormatter{})\n    log.WithField(\"key\", \"value\").Info(\"message here\")\n}\n```\n\n## References\n\n* https://github.com/sirupsen/logrus\n* https://github.com/apex/up\n* https://github.com/grpc-ecosystem/go-grpc-middleware\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxissy%2Flogrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxissy%2Flogrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxissy%2Flogrus/lists"}