Skip to content

Commit fa22ebc

Browse files
committed
fix(auth-services): replace console.log with structured logging for minting success
1 parent ca57a26 commit fa22ebc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/auth-services/src/queue-manager/src/handlers/pkpMint/pkpMint.handler.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { MintPKPRequest } from '@lit-protocol/schemas';
22
import { getChildLogger } from '@lit-protocol/logger';
33

4+
const logger = getChildLogger({ name: 'PkpMintHandler' });
5+
46
/**
57
* Handles PKP minting tasks.
68
* @param jobData The data for the job, expected to contain `requestBody`.
@@ -24,11 +26,17 @@ export async function handlePkpMintTask(jobData: {
2426
mintParams
2527
);
2628

27-
console.log(
28-
`[PkpMintHandler] PKP Minting successful. Token ID: ${result.data.tokenId.toString()}`
29+
logger.info(
30+
{
31+
tokenId: result.data.tokenId.toString(),
32+
authMethodId: jobData.requestBody.authMethodId,
33+
authMethodType: jobData.requestBody.authMethodType,
34+
scopes: jobData.requestBody.scopes,
35+
},
36+
'[PkpMintHandler] PKP mint successful'
2937
);
3038

31-
logger.info({ result }, '[PkpMintHandler] raw mint result:');
39+
logger.debug({ result }, '[PkpMintHandler] raw mint result');
3240

3341
const processedResult = {
3442
hash: result._raw.hash,

0 commit comments

Comments
 (0)