mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore(server): enhance log context and messages (#10151)
This commit is contained in:
@@ -645,7 +645,7 @@ export class PermissionService {
|
||||
action,
|
||||
};
|
||||
this.logger.log(
|
||||
`User's role is lower than required (${JSON.stringify(info)})`
|
||||
`Page role is lower than required, continue to check workspace permission (${JSON.stringify(info)})`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ export class QuotaService {
|
||||
this.logger.error(`Workspace size is invalid: ${size.value}`);
|
||||
}
|
||||
} else {
|
||||
this.logger.error(`Failed to get workspace size: ${size.reason}`);
|
||||
this.logger.error(`Failed to get workspace size`, size.reason);
|
||||
}
|
||||
return total;
|
||||
}, 0);
|
||||
|
||||
@@ -70,9 +70,16 @@ export class S3StorageProvider implements StorageProvider {
|
||||
|
||||
this.logger.verbose(`Object \`${key}\` put`);
|
||||
} catch (e) {
|
||||
throw new Error(`Failed to put object \`${key}\``, {
|
||||
cause: e,
|
||||
});
|
||||
throw new Error(
|
||||
`Failed to put object (${JSON.stringify({
|
||||
key,
|
||||
bucket: this.bucket,
|
||||
metadata,
|
||||
})})`,
|
||||
{
|
||||
cause: e,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user