{"id":29180483,"url":"https://github.com/mdigger/connect-dev-log","last_synced_at":"2025-07-01T20:00:24.855Z","repository":{"id":301982118,"uuid":"1009698247","full_name":"mdigger/connect-dev-log","owner":"mdigger","description":"A high-performance logging interceptor for ConnectRPC with protocol-agnostic request/response logging, protobuf message formatting, and streaming support.","archived":false,"fork":false,"pushed_at":"2025-06-29T23:41:50.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-30T00:26:18.687Z","etag":null,"topics":["connect-rpc","connectrpc","golang","grpc","grpc-log","interceptor"],"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/mdigger.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-27T15:00:41.000Z","updated_at":"2025-06-29T23:41:53.000Z","dependencies_parsed_at":"2025-06-30T00:26:21.326Z","dependency_job_id":"fd67d663-9726-41ca-b43b-c72dc607431c","html_url":"https://github.com/mdigger/connect-dev-log","commit_stats":null,"previous_names":["mdigger/connect-dev-log"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdigger/connect-dev-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdigger%2Fconnect-dev-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdigger%2Fconnect-dev-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdigger%2Fconnect-dev-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdigger%2Fconnect-dev-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdigger","download_url":"https://codeload.github.com/mdigger/connect-dev-log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdigger%2Fconnect-dev-log/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263029211,"owners_count":23402354,"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":["connect-rpc","connectrpc","golang","grpc","grpc-log","interceptor"],"created_at":"2025-07-01T20:00:20.676Z","updated_at":"2025-07-01T20:00:24.763Z","avatar_url":"https://github.com/mdigger.png","language":"Go","readme":"# devlog - ConnectRPC Call Logger\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/mdigger/connect-dev-log.svg)](https://pkg.go.dev/github.com/mdigger/connect-dev-log)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nA feature-rich RPC call logger for ConnectRPC with protocol-agnostic support and structured logging capabilities.\n\n## Features\n\n- **Protocol Support**: Works with gRPC, Connect, and gRPC-Web protocols\n- **Structured Logging**: Clear formatting for requests, responses, and errors\n- **Protobuf Integration**: Built-in support for Protocol Buffer message formatting\n- **Header/Metadata Logging**: Optional logging of request/response headers and metadata\n- **Error Diagnostics**: Detailed error information including ConnectRPC error codes\n- **Streaming Support**: Tracks bidirectional streaming messages with counters\n- **Thread-Safe**: Safe for concurrent use across goroutines\n- **Customizable**: Configurable timestamp formats, header visibility, and message formatting\n\n## Installation\n\n```bash\ngo get github.com/mdigger/connect-dev-log\n```\n\n## Usage\n\n### Basic Setup\n\n```go\nimport (\n\t\"os\"\n\t\"connectrpc.com/connect\"\n\tdevlog \"github.com/mdigger/connect-dev-log\"\n)\n\nfunc main() {\n\tlogger := devlog.New(os.Stdout)\n\tclient := connect.NewClient[YourRequest, YourResponse](\n\t\thttp.DefaultClient,\n\t\t\"http://localhost:8080\",\n\t\tconnect.WithInterceptors(logger),\n\t)\n\t// Use client as normal...\n}\n```\n\n### With Custom Options\n\n```go\nlogger := devlog.New(\n\tos.Stdout,\n\tdevlog.WithTimeFormat(time.DateTime),\n\tdevlog.WithHeaders(true),\n)\n```\n\n### Sample Output\n\n```\n[2023-11-15T14:23:45.123456Z] /package.Service/Method unary [::1]:54321\n  Request:\n    {\"field\":\"value\"}\n  Response:\n    {\"result\":\"success\"}\n  Completed in: 12.345ms\n```\n\n## Configuration Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `WithTimeFormat` | Sets timestamp format (empty string disables) | `time.RFC3339Nano` |\n| `WithHeaders` | Enables/disables header logging | `false` |\n| `WithFormatter` | Custom protobuf message formatter | `protojson.MarshalOptions` |\n\n## Streaming Support\n\nThe logger provides detailed tracking for streaming RPCs, including:\n- Individual message logging for send/receive\n- Message counters\n- Stream duration metrics\n- Client/Server disconnect detection\n\n## Performance Considerations\n\n- Uses a buffer pool to minimize allocations\n- Thread-safe implementation with mutex protection\n\n## Limitations\n\n- Client-side streaming logging not yet implemented (`WrapStreamingClient`)\n- No built-in log level filtering (handle at writer level)\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdigger%2Fconnect-dev-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdigger%2Fconnect-dev-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdigger%2Fconnect-dev-log/lists"}