Skip to content

Commit 56e59d9

Browse files
skyrpextiurin
andauthored
chore: improve log output formatting for logs and telemetry (#13)
Adds a prefix to log output in the logs plugin for better identification and changes telemetry event logging to use debug level with a clear prefix. This enhances log readability and consistency. --------- Co-authored-by: Misha Tiurin <[email protected]>
1 parent 6fa9d38 commit 56e59d9

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/plugins/logs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createPlugin(
1919
stdio: "pipe",
2020
},
2121
);
22-
pipeToLogOutputChannel(logsProcess, outputChannel, "");
22+
pipeToLogOutputChannel(logsProcess, outputChannel, "[localstack.logs]: ");
2323
};
2424

2525
const stopLogging = () => {

src/utils/telemetry.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,9 @@ export function createTelemetry(
167167

168168
postEvent(extensionVersion, telemetryEvent).catch(() => {});
169169

170-
if (process.env.NODE_ENV === "development") {
171-
// only log in output channel for development mode
172-
outputChannel.info(
173-
`Telemetry event tracked: ${JSON.stringify(telemetryEvent)}`,
174-
);
175-
}
170+
outputChannel.trace(
171+
`[telemetry.event]: ${JSON.stringify(telemetryEvent)}`,
172+
);
176173
},
177174
};
178175
}

0 commit comments

Comments
 (0)