diff --git a/src/member.spec.ts b/src/member.spec.ts index 259a98c..aaf3ded 100644 --- a/src/member.spec.ts +++ b/src/member.spec.ts @@ -94,6 +94,9 @@ describe('member', () => { const result = await createMember(ORG_NAME, memberData, serviceOptions); expect(result.didSucceed).toBeTrue(); + expect(mockLogging.logs).toContainEqual( + partialPinoLog('info', 'Member created', { userName: name }), + ); }); test('Missing name should be set to null', async () => { diff --git a/src/member.ts b/src/member.ts index aa5f660..2882af9 100644 --- a/src/member.ts +++ b/src/member.ts @@ -55,7 +55,10 @@ export async function createMember( throw err as Error; } - options.logger.info({ orgName, memberId: member.id }, 'Member created'); + options.logger.info( + { orgName, userName: memberData.name, memberId: member.id }, + 'Member created', + ); return { didSucceed: true, result: { id: member.id },