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

Getting only 10 lines of log with --follow option #166

Open
seungjin opened this issue Dec 20, 2023 · 5 comments
Open

Getting only 10 lines of log with --follow option #166

seungjin opened this issue Dec 20, 2023 · 5 comments

Comments

@seungjin
Copy link

Did this Rust code:

pub async fn post(req: Request, _params: Params) -> Result<Response> {
    println!("POSTED to INBOX");
    for n in 1..20 {
        println!("{n}: ######################");
    }
...
}

So every time when my post method is hit by request, I am supposed to see 20 of {n}: #### lines.
However actually I am just seeing only first 10 lines.
Guessing --tail option's default 10 value is taking over --follow thing.
Following is working but only showing 10 lines every time when I get new logs.
Tried with both --tail and --follow options (spin cloud logs --follow --tail 100) but still getting only 10 lines.

Discord thread here:
https://discord.com/channels/926888690310053918/1024646765149950022/1186957181887729674

@seungjin
Copy link
Author

Also did only with --tail without --follow,, still not seeing more than 10 lines of {n}: #####.

@seungjin
Copy link
Author

seungjin commented Dec 20, 2023

[2023-12-20T09:07:15.835151396Z] POSTED to INBOX
[2023-12-20T09:07:15.835164901Z] 1: ######################
[2023-12-20T09:07:15.835167068Z] 2: ######################
[2023-12-20T09:07:15.835168846Z] 3: ######################
[2023-12-20T09:07:15.835170548Z] 4: ######################
[2023-12-20T09:07:15.835172135Z] 5: ######################
[2023-12-20T09:07:15.835173943Z] 6: ######################
[2023-12-20T09:07:15.835175871Z] 7: ######################
[2023-12-20T09:07:15.835177511Z] 8: ######################
[2023-12-20T09:07:15.835179062Z] 9: ######################
[2023-12-20T09:07:19.136468996Z] POSTED to INBOX
[2023-12-20T09:07:19.136480263Z] 1: ######################
[2023-12-20T09:07:19.136483234Z] 2: ######################
[2023-12-20T09:07:19.136485816Z] 3: ######################
[2023-12-20T09:07:19.136488233Z] 4: ######################
[2023-12-20T09:07:19.136490791Z] 5: ######################
[2023-12-20T09:07:19.136493445Z] 6: ######################
[2023-12-20T09:07:19.136497308Z] 7: ######################
[2023-12-20T09:07:19.136499862Z] 8: ######################
[2023-12-20T09:07:19.136502373Z] 9: ######################
[2023-12-20T09:19:51.432625410Z] POSTED to INBOX
[2023-12-20T09:19:51.432636349Z] 1: ######################
[2023-12-20T09:19:51.432638709Z] 2: ######################
[2023-12-20T09:19:51.432640370Z] 3: ######################
[2023-12-20T09:19:51.432642107Z] 4: ######################
[2023-12-20T09:19:51.432643780Z] 5: ######################
[2023-12-20T09:19:51.432645417Z] 6: ######################
[2023-12-20T09:19:51.432647241Z] 7: ######################
[2023-12-20T09:19:51.432648354Z] 8: ######################
[2023-12-20T09:19:51.432649396Z] 9: ######################

It's from --tail 1000 but I don't see any logs more than 10 lines at a time(event).

@seungjin
Copy link
Author

seungjin commented Dec 20, 2023

% spin cloud --version
Warning: You're using a pre-release version of Spin (2.2.0-pre0). This plugin might not be compatible (supported: >=1.3). Continuing anyway.
spin-cloud 0.5.1 (7c32d40 2023-12-18)

@seungjin
Copy link
Author

% spin cloud logs --version
Warning: You're using a pre-release version of Spin (2.2.0-pre0). This plugin might not be compatible (supported: >=1.3). Continuing anyway.
spin-cloud-logs 0.5.1 (7c32d40 2023-12-18)

@seungjin
Copy link
Author

--since only shows 10 lines of logs as well.

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

1 participant