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
| Attribute | Type | Description |
|---|---|---|
| Name | Name of the plugin. | |
| DisplayName | Display name for the generated log when displayed in the console. | |
| TemplateURIs | URI Templates for generating task log links. | |
| DynamicTemplateURIs | URI Templates for generating dynamic task log links. | |
| MessageFormat | Log Message Format. | |
| DeprecatedScheme | Templating scheme to use. Supported values are Pod and TaskExecution. | |
| ShowWhilePending | If true, the log link will be shown even if the task is in a pending state. | |
| HideOnceFinished | If true, the log link will be hidden once the task has finished. | |
| LinkType | Type of the log. (external, dashboard, or ide). This is used to distinguish between different log links. | |
| IconUri | Icon 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
| Name | Type | Description |
|---|---|---|
| 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
| Type | Description |
|---|---|
[Output](output.md?sid=flyteplugins_go_tasks_pluginmachinery_tasklog_output), error | A tuple containing the output of the task logs and any error encountered during the retrieval process. |