Skip to content

Commit 45834ad

Browse files
authored
Merge pull request #280 from salesforcecli/sm/no-tail-json
feat!: remove --json from log tail
2 parents 34ce840 + 8bce78a commit 45834ad

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

command-snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
{
8888
"command": "apex:tail:log",
8989
"plugin": "@salesforce/plugin-apex",
90-
"flags": ["api-version", "color", "debug-level", "json", "loglevel", "skip-trace-flag", "target-org"],
90+
"flags": ["api-version", "color", "debug-level", "loglevel", "skip-trace-flag", "target-org"],
9191
"alias": ["force:apex:log:tail"],
9292
"flagChars": ["c", "d", "o", "s"],
9393
"flagAliases": ["apiversion", "debuglevel", "skiptraceflag", "targetusername", "u"]

src/commands/apex/tail/log.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class Log extends SfCommand<void> {
2727
public static readonly examples = messages.getMessages('examples');
2828
public static readonly deprecateAliases = true;
2929
public static readonly aliases = ['force:apex:log:tail'];
30-
30+
public static readonly enableJsonFlag = false;
3131
public static readonly flags = {
3232
'target-org': requiredOrgFlagWithDeprecations,
3333
'api-version': orgApiVersionFlagWithDeprecations,
@@ -70,15 +70,8 @@ export default class Log extends SfCommand<void> {
7070

7171
public async logTailer(fullLog: string): Promise<void> {
7272
if (fullLog) {
73-
if (this.jsonEnabled()) {
74-
this.styledJSON({
75-
status: process.exitCode,
76-
result: fullLog,
77-
});
78-
} else {
79-
const output = this.color ? await colorizeLog(fullLog) : fullLog;
80-
this.log(output);
81-
}
73+
const output = this.color ? await colorizeLog(fullLog) : fullLog;
74+
this.log(output);
8275
}
8376
}
8477

0 commit comments

Comments
 (0)