Use internal logger instead of debug/console for logging
Resolve #4104 Resolve #1966 Resolve #1937
This commit is contained in:
parent
3a5867b324
commit
0868c3517f
41 changed files with 136 additions and 109 deletions
|
|
@ -8,6 +8,7 @@ import rndstr from 'rndstr';
|
|||
import config from '../../../../config';
|
||||
import * as ms from 'ms';
|
||||
import * as bcrypt from 'bcryptjs';
|
||||
import { apiLogger } from '../../logger';
|
||||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
|
|
@ -91,10 +92,11 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
|||
text: `To verify email, please click this link: ${link}`
|
||||
}, (error, info) => {
|
||||
if (error) {
|
||||
return console.error(error);
|
||||
apiLogger.error(error);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Message sent: %s', info.messageId);
|
||||
apiLogger.info('Message sent: %s', info.messageId);
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue