Hi Team, How to get flow logs using command line i...
# ask-community
m
Hi Team, How to get flow logs using command line in prefect2? In prefect1 we can use
prefect get
command to get logs.
1
r
They are not available yet in the cli sadly
m
yep, that's what I've discovered as well.
Can a member of the Prefect Team confirm this?
1
p
Hey @Mahesh you can see all available commands with
prefect --help
and you can run
--help
on any individual command to explore them. It's not currently available via the CLI. The closest you've got is
prefect flow-run inspect
which will give you the state
m
@Peyton Runyan Will this be included in a future release?
p
It doesn't look like we have an enhancement request for it, so the best way to get eyes on it would be to create an issue for a feature enhancement. It seems like a reasonable request, so once we got a request for it and a bit of free time relative to high-priority features, it seems likely that this would make it out in a future release. https://github.com/PrefectHQ/prefect/issues/new/choose
r
the docs actually say its possible
closest issue I could find was allow the realtime stream of the log via the cli
m
@Peyton Runyan thanks for the confirmation and I have created below feature request, https://github.com/PrefectHQ/prefect/issues/7814
🙏 2
r
👀 2
p
huh... I'll dig into that. The API you can do for sure.
I think that's a mistake in the docs. The method for getting the logs is
client.read_logs
. Our CLI pretty much just calls the client. We don't call the method anywhere in our codebase
t
This is a mistake in the docs. It will be fixed in the next release.
🙏 1
👍 3
s
@Mahesh @redsquare This enhancement should be released tomorrow
👍 1