org.springframework.cloud.dataflow.server.controller

## Class TaskLogsController

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.TaskLogsController

-     @RestController
       @RequestMapping(value="/tasks/logs")
      public class TaskLogsController
      extends Object

  Retrieves logs of task applications.
  Author:
    Ilayaperumal Gopinathan

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskLogsController(TaskExecutionService taskExecutionService)` Construct Task logs controller.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.http.ResponseEntity<String>` | `getLog(String taskExternalExecutionId, String platformName)` Retrieve logs for the task execution identified by the provided external execution ID

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskLogsController

          public TaskLogsController(TaskExecutionService taskExecutionService)

      Construct Task logs controller.
      Parameters:
        `taskExecutionService` - the task execution service that this controller uses to get the logs of launched task applications.

  - ### Method Detail

    - #### getLog

          @RequestMapping(value="/{taskExternalExecutionId}",
                          method=GET)
           @ResponseStatus(value=OK)
          public org.springframework.http.ResponseEntity<String> getLog(@PathVariable
                                                                                                                                                                                   String taskExternalExecutionId,
                                                                                                                                                                                   @RequestParam(required=false,defaultValue="default")
                                                                                                                                                                                   String platformName)

      Retrieve logs for the task execution identified by the provided external execution ID
      Parameters:
        `taskExternalExecutionId` - the external execution ID returned by the platform when launching the task
        `platformName` - the platform name
      Returns:
        the log content represented as String

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.