Skip to content

Commit 4a0bf13

Browse files
committed
reactor: add logging to help troubleshoot logging
Add a log statement so that we can determine which file descriptors are used for which tasks.
1 parent a79caa6 commit 4a0bf13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

go/bindings/task_service.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ func NewTaskService(
5353
return nil, fmt.Errorf("creating logging pipe: %w", err)
5454
}
5555
config.LogFileFd = int32(wDescriptor)
56+
// Log so that we can know the association between tasks and log file descriptors,
57+
// for troubleshooting issues with missing logs.
58+
logrus.WithFields(logrus.Fields{
59+
"task_name": config.TaskName,
60+
"logs_write_fd": wDescriptor,
61+
"log_read_fd": logReader.Fd(),
62+
}).Info("created new pipe for task logs")
5663

5764
// Rust services produce canonical JSON encodings of ops::Log into `wDescriptor`.
5865
// Parse each and pass to our `publisher`.

0 commit comments

Comments
 (0)