Skip to content

Commit 95d7018

Browse files
committed
feat: support specifying an ending time for PaaS logs
1 parent 657aa8f commit 95d7018

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/commands/paas/logs.ts

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class PaasLogs extends PaasKommand {
6060
since: flags.string({
6161
description: "Display logs from a specific absolute (e.g. 2022/12/02 09:41) or relative (e.g. a minute ago) time",
6262
}),
63+
until: flags.string({
64+
description: "Display logs until a specific absolute (e.g. 2022/12/02 09:41) or relative (e.g. a minute ago) time",
65+
}),
6366
};
6467

6568
static args = [
@@ -106,6 +109,7 @@ class PaasLogs extends PaasKommand {
106109

107110
// Parse the time arguments
108111
const since = this.flags.since ? chrono.parseDate(this.flags.since).toISOString() : undefined;
112+
const until = this.flags.until ? chrono.parseDate(this.flags.until).toISOString() : undefined;
109113

110114
// Perform the streamed request
111115
const incomingMessage = await this.paas.queryHttpStream({
@@ -118,6 +122,7 @@ class PaasLogs extends PaasKommand {
118122
tailLines: this.flags.tail,
119123
podName: this.flags.podName,
120124
since,
125+
until,
121126
});
122127

123128
// Read the response line by line

0 commit comments

Comments
 (0)