GetPrimaryPodAndContainer
Finds the primary pod and container from a LogContext.
def GetPrimaryPodAndContainer(
logContext: *core.LogContext
) - > (*core.PodLogContext, *core.ContainerContext, error)
Finds the primary pod and container from a LogContext. This function is used to retrieve specific log context components for further processing or display.
Parameters
| Name | Type | Description |
|---|---|---|
| logContext | *core.LogContext | The log context object containing information about pods and containers, including the names of the primary pod and container. |
Returns
| Type | Description |
|---|---|
(*core.PodLogContext, *core.ContainerContext, error) | The primary pod context, the primary container context, and an error if the primary pod or container cannot be found or if the primary pod name is empty. |