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

logs ls --number has no effect #936

Open
6 tasks done
jonaustin opened this issue Dec 6, 2023 · 4 comments
Open
6 tasks done

logs ls --number has no effect #936

jonaustin opened this issue Dec 6, 2023 · 4 comments
Labels
bug This points to a verified bug in the code

Comments

@jonaustin
Copy link

jonaustin commented Dec 6, 2023

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this project and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

❯ auth0 logs ls --number 100000 |wc -l

=== xxxx.us.auth0.com logs

     101
❯ auth0 logs ls |wc -l

=== xxx.us.auth0.com logs

     101

Poked at the code, and there's simply no code that loops over pages:
https://github.com/auth0/auth0-cli/blob/main/internal/cli/logs.go#L172-L189

Expectation

Passing in -n/--number >100 should fetch more than 100 log entries.

Reproduction

auth0 logs ls --number 100000

Auth0 CLI version

❯ auth0 -v
auth0 version 1.3.0 2bd069c

@jonaustin jonaustin added the bug This points to a verified bug in the code label Dec 6, 2023
willvedd added a commit that referenced this issue Dec 7, 2023
@willvedd
Copy link
Contributor

This is fixed in #939 but still waiting on a release.

@jonaustin
Copy link
Author

@willvedd Why is the maximum only 1000?

That greatly reduces the utility of this in my mind; i.e. it's still not really all that useful if it can only go back 1000 log entries.

@willvedd
Copy link
Contributor

Arbitrarily set at 1000 for practically; there is no technical limitation. IMO, this will satisfy most (but obviously not all) use cases around logs. And we need to bound at some point.

It would help to understand the workflow you're trying to achieve. Short of upping the limit a little, we're unlikely to immediately implement but it is still important for us to know the features you want for the CLI.

@DannyPat44
Copy link

I would also like to see a higher number, but primarily so that I can determine easily how many particular errors of a specific kind have occurred. If a utility for the CLI allowed you to do this, it would probably be okay to cap the total number returned at 1000.

There doesn't seem to be a query to do this with the Lucene filters.

For example, I was trying to use the -n to do things like this:
auth0 logs list --filter "type: f AND date:[2023-01-01 TO 2024-01-05]" | wc -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

3 participants