Skip to content

Commit b15cca8

Browse files
committed
fix: api logger
1 parent 31e34ad commit b15cca8

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

apps/api/src/lib/logger.ts

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
1-
// import { Logtail } from '@logtail/edge';
1+
import { logger as sharedLogger } from "@databuddy/shared/logger";
22

3-
// const token = process.env.LOGTAIL_SOURCE_TOKEN as string;
4-
// const endpoint = process.env.LOGTAIL_ENDPOINT as string;
5-
6-
// if (!(token && endpoint)) {
7-
// console.log('LOGTAIL_SOURCE_TOKEN and LOGTAIL_ENDPOINT must be set');
8-
// }
9-
10-
// export const logger = new Logtail(token, {
11-
// endpoint,
12-
// batchSize: 10,
13-
// batchInterval: 1000,
14-
// });
15-
16-
import { pino } from "pino";
17-
18-
const logger = pino({
19-
level: "debug",
20-
transport: {
21-
target: "pino-pretty",
22-
options: {
23-
colorize: true,
24-
},
25-
},
26-
});
27-
28-
export { logger };
3+
export const logger = sharedLogger.child({
4+
service: "api",
5+
});

0 commit comments

Comments
 (0)