We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d35225 commit f05c5ceCopy full SHA for f05c5ce
config.ts
@@ -8,4 +8,5 @@ export const environment = {
8
META_DATA: process.env.META_DATA ?? 'AstroX11;Xstro',
9
TIME_ZONE: process.env.TIME_ZONE || process.env.TZ || '',
10
WARN_COUNT: Number(process.env.WARN_COUNT ?? 3),
11
+ DEBUG: process.env.DEBUG ?? false,
12
};
src/client/connection.mts
@@ -13,12 +13,13 @@ import {
13
type Client,
14
saveReceipts,
15
} from '../index.mts';
16
+import { environment } from '../../config.ts';
17
18
EventEmitter.defaultMaxListeners = 10000;
19
process.setMaxListeners(10000);
20
21
export const logger = Logger.pino({
- level: 'info',
22
+ level: environment.DEBUG ? 'info' : 'silent',
23
});
24
25
export const client = async (): Promise<Client> => {
0 commit comments