Nested flows/scripts logs in main flow
When there is a flow which contains another flow or scripts then the nested one's logs don't show up in the main flow logs. Any way to show them?
13 Replies
@fjørdlek
Any help would be appreciated
see screenshots above


@fjørdlek
There are currently 2 problems which I have.
1. For nested Flows it is possible to see the logs by navigating through the UI but there is no single logs page where I can see the all the log in sequential manner. There is "explore all step's logs" link but it is very difficult to understand the sequence or which steps it belongs. Attached Image
2. If a script is called from within another script then the nested script logs are not visible by any means. Even I set debug to true.
Synatx: await wmill.runScript('u/admin/nested_script',null,{x:"HELLO"},true);
Also, there is no api which returns all the logs in a single call.



@PankajMahato we do have a backlog item to improve the flow log experience. For 2. that's expected, similar as with flow, each job is it's own isolated process with it's own logs so it does not make senes to give the impression that they are just executed as one. Running a windmill script triggers a new job with it's own logs (you can go to the runs page and find that log or use the api to print the log/status in your calling script).
Thanks a lot @fjørdlek for the detailed answer.
For the last option, if I decide to make it synchronous nested script call and then print the logs. Then I have to write a HTTP get call from my typescript code after this line
await wmill.runScript('u/admin/nested_script',null,{x:"HELLO"},true);
But to make an API call I would need to create a separate token right? Even though it is executed from within a script/flow, for the backend it will appear as a fresh call?no you can use
$WM_TOKEN
contextual env var each script has access to which is an ephemeral token that can be used
you can also use wmill.JobService.getJobLogs
and it will take care of the tokenThanks ❤️
@fjørdlek
I was searching Windmill docs but couldn't find any example/reference for
wmill.JobService.getJobLogs
Can you please share some examples or the docs link?logs = await wmill.JobService.getJobLogs({ workspace: workspaceId, id: jobId });
Thanks, is there any separate docs page to get these kind of info?
I am aware of only https://app.windmill.dev/openapi.html . Here only REST APIs are present
yeah, so basically each API endpoint autogenerates a function in the typescript client:
so in the get job logs openapi reference, you'll see a "tag" in that case called job => JobService and then operationId => function name getJobLogs
Understood. Thanks ❤️
and we also autogenerate types, so usually you're ide (or the windmill frontend webIde) will be able to "autocomplete" it for you

