Skip to content

Commit 23851ec

Browse files
authored
logger: Replace .warn() by .warning() (#668)
1 parent 22a7b77 commit 23851ec

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

jobs/pending_payments.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ export const attemptPendingPayments = async (bot: Telegraf<CommunityContext>): P
9999
pending.last_error = payment.error as string;
100100

101101
if (payment.error === 'TIMEOUT') {
102-
logger.warn(`Payment timeout for order ${order._id}, attempt ${pending.attempts}`);
102+
logger.warning(`Payment timeout for order ${order._id}, attempt ${pending.attempts}`);
103103
} else if (payment.error === 'ROUTING_FAILED') {
104-
logger.warn(`Routing failed for order ${order._id}, attempt ${pending.attempts}`);
104+
logger.warning(`Routing failed for order ${order._id}, attempt ${pending.attempts}`);
105105
} else {
106106
logger.error(`Payment failed for order ${order._id}, attempt ${pending.attempts}, error: ${payment.error}`);
107107
}

ln/pay_request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ const payToBuyer = async (bot: HasTelegram, order: IOrder) => {
136136
const errorType = payment.error as string;
137137

138138
if (errorType === 'TIMEOUT') {
139-
logger.warn(`Payment timeout for order ${order._id}, will retry later`);
139+
logger.warning(`Payment timeout for order ${order._id}, will retry later`);
140140
await messages.invoicePaymentFailedMessage(bot, buyerUser, i18nCtx);
141141
} else if (errorType === 'ROUTING_FAILED') {
142-
logger.warn(`Routing failed for order ${order._id}, will retry with cleared reputation`);
142+
logger.warning(`Routing failed for order ${order._id}, will retry with cleared reputation`);
143143
await messages.invoicePaymentFailedMessage(bot, buyerUser, i18nCtx);
144144
} else {
145145
logger.error(`Payment failed for order ${order._id} with error: ${errorType}`);

logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const logOperationDuration = (operation: string, startTime: number, succe
4444
};
4545

4646
if (duration > 30000) { // Log slow operations (>30s)
47-
logger.warn(`SLOW_OPERATION: ${JSON.stringify(logData)}`);
47+
logger.warning(`SLOW_OPERATION: ${JSON.stringify(logData)}`);
4848
} else {
4949
logger.info(`OPERATION_DURATION: ${JSON.stringify(logData)}`);
5050
}

util/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ const generateRandomImage = async (nonce: string) => {
562562
if (honeybadgerExists) {
563563
const goldenProbability = parseInt(process.env.GOLDEN_HONEY_BADGER_PROBABILITY || '100');
564564
if (isNaN(goldenProbability)) {
565-
logger.warn("GOLDEN_HONEY_BADGER_PROBABILITY not configured properly, using default 100");
565+
logger.warning("GOLDEN_HONEY_BADGER_PROBABILITY not configured properly, using default 100");
566566
}
567567

568568
const probability = isNaN(goldenProbability) ? 100 : Math.max(1, goldenProbability);

0 commit comments

Comments
 (0)