-
Notifications
You must be signed in to change notification settings - Fork 254
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
Add log streaming in beta platform #1743
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I left some non-blocking questions and notes.
@@ -832,6 +837,38 @@ impl Shuttle { | |||
Ok(CommandOutcome::Ok) | |||
} | |||
|
|||
async fn logs_beta(&self, args: LogsArgs) -> Result<CommandOutcome> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will there be a non-streaming option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and probably sooner rather than later since I've just discovered the cost of a Kinesis Stream 🥲
if args.raw { | ||
println!("{}", log.line); | ||
} else { | ||
println!("[{}] ({}) {}", log.timestamp, log.source, log.line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use the Display impl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should use Display
there. It's only useful in the context of printing to the console.
I know I've pushed against having v1/v2, we'll refactor later, but that's the cleanest way I've found.