Better logs
This commit is contained in:
parent
4f9b015d1c
commit
d50624f0a0
@ -49,7 +49,7 @@ export default class Resolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.history.has(value)) {
|
if (this.history.has(value)) {
|
||||||
logger.error(`cannot resolve already resolved one`);
|
logger.error(`cannot resolve already resolved one: ${value}`);
|
||||||
throw new Error('cannot resolve already resolved one');
|
throw new Error('cannot resolve already resolved one');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,10 @@ export default class Resolver {
|
|||||||
},
|
},
|
||||||
json: true
|
json: true
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
logger.error(`request error: ${e.message}`);
|
logger.error(`request error: ${value}: ${e.message}`, {
|
||||||
|
url: value,
|
||||||
|
e: e
|
||||||
|
});
|
||||||
throw new Error(`request error: ${e.message}`);
|
throw new Error(`request error: ${e.message}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -74,7 +77,10 @@ export default class Resolver {
|
|||||||
!object['@context'].includes('https://www.w3.org/ns/activitystreams') :
|
!object['@context'].includes('https://www.w3.org/ns/activitystreams') :
|
||||||
object['@context'] !== 'https://www.w3.org/ns/activitystreams'
|
object['@context'] !== 'https://www.w3.org/ns/activitystreams'
|
||||||
)) {
|
)) {
|
||||||
logger.error(`invalid response: ${value}`);
|
logger.error(`invalid response: ${value}`, {
|
||||||
|
url: value,
|
||||||
|
object: object
|
||||||
|
});
|
||||||
throw new Error('invalid response');
|
throw new Error('invalid response');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ export default async function(
|
|||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info(`drive usage is ${usage}`);
|
logger.debug(`drive usage is ${usage}`);
|
||||||
|
|
||||||
const instance = await fetchMeta();
|
const instance = await fetchMeta();
|
||||||
const driveCapacity = 1024 * 1024 * (isLocalUser(user) ? instance.localDriveCapacityMb : instance.remoteDriveCapacityMb);
|
const driveCapacity = 1024 * 1024 * (isLocalUser(user) ? instance.localDriveCapacityMb : instance.remoteDriveCapacityMb);
|
||||||
|
Loading…
Reference in New Issue
Block a user