Logging mechanism for frontends
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 50
Description
Currently any logging done by a frontend to its stdio goes to the daemon logs (for builtin and, I think, server side gateway based frontends) or to the client stdio (client side gateway frontends) where it corrupts the tty based logging.
Shall we consider adding a Log method of some sort to the gRPC provided to the frontend? So in frontend/gateway/pb/gateway.proto add:
service LLBBridge {
// apicaps:CapResolveImage
rpc ResolveImageConfig(ResolveImageConfigRequest) returns (ResolveImageConfigResponse);
// apicaps:CapSolveBase
rpc Solve(SolveRequest) returns (SolveResponse);
// apicaps:CapReadFile
rpc ReadFile(ReadFileRequest) returns (ReadFileResponse);
// apicaps:CapReadDir
rpc ReadDir(ReadDirRequest) returns (ReadDirResponse);
rpc Ping(PingRequest) returns (PongResponse);
rpc Return(ReturnRequest) returns (ReturnResponse);
+ rpc Log(LogRequest) returns (google.protobuf.Empty);
}
+message LogRequest {
+ string message = 1;
+ «enum|int|tbd» level = 2;
+ map<string, string> metadata = 3;
+}
and then figure out a way to integrate that stream with controlapi.StatusResponse (and to display it)?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with frontend/gateway/pb/gateway.proto and inspect controlapi.StatusResponse to understand the existing frontend gateway and status paths. Determine how a frontend log request could be integrated and displayed without corrupting daemon or client tty logs. Done means frontend logging has a defined transport and appears through the intended status output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grpc
- Domain
- backend-api-design, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100