Skip to main content

TemplateLogPlugin

This class defines a plugin for generating task log links. It allows for static and dynamic URI templates, specifies the message format, and includes options for controlling visibility based on task status. The plugin also supports custom display names, link types, and icons.

Attributes

AttributeTypeDescription
NameName of the plugin.
DisplayNameDisplay name for the generated log when displayed in the console.
TemplateURIsURI Templates for generating task log links.
DynamicTemplateURIsURI Templates for generating dynamic task log links.
MessageFormatLog Message Format.
DeprecatedSchemeTemplating scheme to use. Supported values are Pod and TaskExecution.
ShowWhilePendingIf true, the log link will be shown even if the task is in a pending state.
HideOnceFinishedIf true, the log link will be hidden once the task has finished.
LinkTypeType of the log. (external, dashboard, or ide). This is used to distinguish between different log links.
IconUriIcon URI for the log link.

Methods


GetTaskLogs()

@classmethod
def GetTaskLogs(
input: [Input](input.md?sid=flyteplugins_go_tasks_pluginmachinery_tasklog_input)
) - > [Output](output.md?sid=flyteplugins_go_tasks_pluginmachinery_tasklog_output), error

Retrieves task logs based on the provided input. This method is used to fetch log information for a specific task.

Parameters

NameTypeDescription
input[Input](input.md?sid=flyteplugins_go_tasks_pluginmachinery_tasklog_input)The input object containing parameters necessary to identify and retrieve the task logs, such as task ID or execution details.

Returns

TypeDescription
[Output](output.md?sid=flyteplugins_go_tasks_pluginmachinery_tasklog_output), errorA tuple containing the output of the task logs and any error encountered during the retrieval process.