Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the --since flag in cloud logs doesn't show the expected logs. #163

Open
mikkelhegn opened this issue Dec 7, 2023 · 3 comments
Open

Comments

@mikkelhegn
Copy link
Member

When using the --since flag, I always get the latest 10 logs, not the logs since the timeframe desired.

@vdice
Copy link
Member

vdice commented Sep 17, 2024

Apparently the default of 10 log lines comes from the --tail flag, even when not used:

        --tail <tail>
            Number of lines to show from the end of the logs [default: 10]

So, to get more than 10 logs when using --since, you'd want to supply --tail N:

$ spin cloud logs nuevo --since 365d --tail 25 | wc -l
25

@bacongobbler
Copy link
Member

IIRC the limit was put in place because our internal infrastructure needs to be refactored before we could tie another dependency to it, so we decided to restrict the number of logs we show to a very restricted amount.

If we decide to proceed with those infrastructure improvements (more specifically our log journal system), we should be able to raise that default limit, and therefore --since would work as expected.

@bacongobbler
Copy link
Member

bacongobbler commented Sep 17, 2024

Maybe there's a bit of a misunderstanding. If you enter the following:

spin cloud logs nuevo --since 365d

Do you expect the first 10 logs to start from 365 days ago? As in, you expect it to show logs from one year in the past, rather than logs up to one year ago?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants