Skip to content

Commit

Permalink
Merge pull request #13947 from petermattis/pmattis/status-logs
Browse files Browse the repository at this point in the history
server: respect LogRequest.NodeId parameter
  • Loading branch information
petermattis authored Mar 8, 2017
2 parents a518a78 + 8c39319 commit 92fb129
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/server/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,21 @@ func parseInt64WithDefault(s string, defaultValue int64) (int64, error) {
// * "level" query parameter filters the log entries to be those of the
// corresponding severity level or worse. Defaults to "info".
func (s *statusServer) Logs(
_ context.Context, req *serverpb.LogsRequest,
ctx context.Context, req *serverpb.LogsRequest,
) (*serverpb.LogEntriesResponse, error) {
ctx = s.AnnotateCtx(ctx)
nodeID, local, err := s.parseNodeID(req.NodeId)
if err != nil {
return nil, grpc.Errorf(codes.InvalidArgument, err.Error())
}
if !local {
status, err := s.dialNode(nodeID)
if err != nil {
return nil, err
}
return status.Logs(ctx, req)
}

log.Flush()

var sev log.Severity
Expand Down

0 comments on commit 92fb129

Please sign in to comment.