File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed
Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change 1- import { Node } from '@logtail/js ' ;
1+ import { Logtail } from '@logtail/edge ' ;
22
3- const logger = new Node ( process . env . LOGTAIL_SOURCE_TOKEN as string , {
4- endpoint : 'https://s1447431.eu-nbg-2.betterstackdata.com' ,
3+ const token = process . env . LOGTAIL_SOURCE_TOKEN as string ;
4+ const endpoint = process . env . LOGTAIL_ENDPOINT as string ;
5+ export const logger = new Logtail ( token , {
6+ endpoint,
7+ batchSize : 10 ,
8+ batchInterval : 1000 ,
59} ) ;
610
7- export { logger } ;
11+ // Log levels to ensure we only log important events
12+ // export enum LogLevel {
13+ // ERROR = 'error',
14+ // WARN = 'warn',
15+ // INFO = 'info',
16+ // DEBUG = 'debug'
17+ // }
18+
19+ // const log = (level: LogLevel, message: string, data?: any) => {
20+ // logger.log(level, message, data);
21+ // };
22+
23+ // const pinoLogger = pino({
24+ // level: 'info',
25+ // transport: {
26+ // target: 'pino-pretty',
27+ // },
28+ // });
29+
30+ // export { pinoLogger as logger };
You can’t perform that action at this time.
0 commit comments