Skip to main content Skip to complementary content

Using MetaServlet to print the log file of a task

About this task

In the following scenario, the log file of a task is retrieved from Talend Administration Center and printed in the command lines.

Prerequisite: Make sure an existing task is available in the Job Conductor in Talend Administration Center before you proceed the following steps.

Procedure

  1. Open the Windows command line or Linux terminal, and go to the following directory: ./org.talend.administrator/WEB-INF/classes.
  2. Run:
    • MetaServletCaller.bat to call the metaServlet on Windows.
    • MetaServletCaller.sh to call the metaServlet on Linux.
  3. To perform a MetaServlet action, type in corresponding scripts in the command line (or terminal for Linux users).
    In this example, to retrieve the log file of a task by the given name from Talend Administration Center, use the following script to perform the action:
    MetaServletCaller.bat 
    --tac-url=http://localhost:8080/org.talend.administrator 
    --json-params=
    "{
    'actionName':'taskLog',
    'taskId':1,
    'authPass':'TAC_Admin_password',
    'authUser':'TAC_Admin_username'
    }"
    Replace the parameters with what they are in real contexts and respect the format used in the script above for these parameters.
    Once the command has been executed, the information in the log file of task 1 will be retrieved and printed in the command lines.

Results

The execution information is displayed in the Task execution monitoring console of the Talend Administration Center.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!