We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b922cd commit b08e213Copy full SHA for b08e213
src/internal/log.ts
@@ -1,16 +1,13 @@
1
-import packageJson from "../../package.json";
2
-
3
export const info = (message: any, obj?: Record<string, any>): void => {
4
- console.log(
5
- `[${packageJson.name}@${packageJson.version}] ${message}`,
6
- obj ? JSON.stringify(obj) : undefined
7
- );
+ const msg = `[awslambda-bootstrap] ${message}`;
+ if (!obj) {
+ console.log(msg);
+ return;
+ }
+ console.log(msg, obj);
8
};
9
10
export const log = (message: any, obj?: Record<string, any>): void => {
11
if (!process.env.SLY_DEBUG) return;
12
13
14
15
+ info(message, obj);
16
0 commit comments