Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
change log flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrauskopf committed Oct 29, 2020
1 parent 48a8d82 commit 406ee88
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/commands/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ export default class Logs extends BaseCommand {
default: false,
description: "Show internal logs along with the app developer related ones"
}),
raw: flags.boolean({
char: "r",
description: "Show logs in raw format",
default: false
format: flags.string({
char: "f",
description: "The format the logs get shown in",
options: ["default", "raw"],
default: "default"
})
};

Expand Down Expand Up @@ -61,7 +62,7 @@ export default class Logs extends BaseCommand {

const logs = await apiClient.deployments.getLogsById({ deployId: latestDeployment.deployId, appId: platformApp.id })

if (!flags.raw) {
if (flags.format !== "raw") {
const parsedLogs = parseDIPLogs(logs, flags.lines, flags.all);
parsedLogs.map(log => this.log(log));
}
Expand Down

0 comments on commit 406ee88

Please sign in to comment.