[Server] Use logger for logging
This commit is contained in:
parent
110eeb89f1
commit
238c6a428b
5 changed files with 34 additions and 30 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import * as request from 'request-promise-native';
|
||||
import * as debug from 'debug';
|
||||
import { IObject } from './type';
|
||||
import config from '../../config';
|
||||
import { apLogger } from './logger';
|
||||
|
||||
const log = debug('misskey:activitypub:resolver');
|
||||
export const logger = apLogger.createSubLogger('resolver');
|
||||
|
||||
export default class Resolver {
|
||||
private history: Set<string>;
|
||||
|
|
@ -67,7 +67,7 @@ export default class Resolver {
|
|||
!object['@context'].includes('https://www.w3.org/ns/activitystreams') :
|
||||
object['@context'] !== 'https://www.w3.org/ns/activitystreams'
|
||||
)) {
|
||||
log(`invalid response: ${value}`);
|
||||
logger.error(`invalid response: ${value}`);
|
||||
throw new Error('invalid response');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue