From dcb5a71b92e57481de5d983502f9b5d8ee718016 Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 13 Nov 2022 17:14:14 +0800 Subject: [PATCH] feat: log user id --- packages/plugins/users/src/middlewares/parseToken.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/plugins/users/src/middlewares/parseToken.ts b/packages/plugins/users/src/middlewares/parseToken.ts index a82137e33..64d801552 100644 --- a/packages/plugins/users/src/middlewares/parseToken.ts +++ b/packages/plugins/users/src/middlewares/parseToken.ts @@ -29,9 +29,11 @@ async function findUserByToken(ctx: Context) { id: userId, }, }); + ctx.logger.info(`Current user id: ${userId}`); return user; } catch (error) { console.log(error); + ctx.logger.error(error); return null; } }