Skip to content

Commit

Permalink
Merge pull request #137 from PermanentOrg/dependabot/npm_and_yarn/win…
Browse files Browse the repository at this point in the history
…ston-3.8.2
  • Loading branch information
dependabot[bot] committed Apr 17, 2023
2 parents e992a27 + daeec8d commit e78ff76
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 61 deletions.
137 changes: 78 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"ssh2": "^1.11.0",
"tmp": "^0.2.1",
"uuid": "^9.0.0",
"winston": "^3.4.0"
"winston": "^3.8.2"
}
}
5 changes: 4 additions & 1 deletion src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ const template = ({
const meta = Object.keys(rest).length > 0 ? ` ${JSON.stringify(rest)}` : '';
const stacktrace = typeof stack === 'string' ? `\n${stack}` : '';
const timestamp = new Date().toLocaleString();
return `${timestamp} ${level}: ${message}${meta}${stacktrace}`;
const sanitizedMessage = typeof message === 'string'
? message
: '';
return `${timestamp} ${level}: ${sanitizedMessage}${meta}${stacktrace}`;
};

const debugLogger = createLogger({
Expand Down

0 comments on commit e78ff76

Please sign in to comment.