Skip to content

Commit

Permalink
Merge pull request #82 from wakatime/bugfix/log-cli-output
Browse files Browse the repository at this point in the history
Log output from wakatime-cli
  • Loading branch information
alanhamlett authored Dec 17, 2024
2 parents e8ee235 + e2386d5 commit 38d8e50
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions electron/watchers/wakatime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,19 @@ export class Wakatime {
}

const cli = getCLIPath();
Logging.instance().log(`Sending heartbeat: ${cli} ${args}`);
Logging.instance().log(`Sending heartbeat: ${cli} ${args}`, LogLevel.DEBUG);

try {
const [, err] = await exec(cli, ...args);
const [output, err] = await exec(cli, ...args);
if (err) {
Logging.instance().log(
`Error sending heartbeat: ${err}`,
LogLevel.ERROR,
);
}
if (output) {
Logging.instance().log(output);
}
} catch (error) {
Logging.instance().log(
`Failed to send heartbeat: ${error}`,
Expand Down

0 comments on commit 38d8e50

Please sign in to comment.