mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-26 01:23:40 +03:00
chore: adjust log level (#6913)
This commit is contained in:
parent
b8333de119
commit
8881286025
@ -102,7 +102,9 @@ export class DocHistoryManager {
|
||||
description: 'How many times the snapshot history created',
|
||||
})
|
||||
.add(1);
|
||||
this.logger.log(`History created for ${id} in workspace ${workspaceId}.`);
|
||||
this.logger.debug(
|
||||
`History created for ${id} in workspace ${workspaceId}.`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,10 +72,12 @@ export class QuotaManagementService {
|
||||
const total = usedSize + recvSize;
|
||||
// only skip total storage check if workspace has unlimited feature
|
||||
if (total > quota && !unlimited) {
|
||||
this.logger.log(`storage size limit exceeded: ${total} > ${quota}`);
|
||||
this.logger.warn(`storage size limit exceeded: ${total} > ${quota}`);
|
||||
return true;
|
||||
} else if (recvSize > blobLimit) {
|
||||
this.logger.log(`blob size limit exceeded: ${recvSize} > ${blobLimit}`);
|
||||
this.logger.warn(
|
||||
`blob size limit exceeded: ${recvSize} > ${blobLimit}`
|
||||
);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -42,7 +42,7 @@ export class CacheInterceptor implements NestInterceptor {
|
||||
if (preventKey) {
|
||||
const key = await this.getCacheKey(ctx, preventKey);
|
||||
if (key) {
|
||||
this.logger.debug(`cache ${key} staled`);
|
||||
this.logger.verbose(`cache ${key} staled`);
|
||||
await this.cache.delete(key);
|
||||
}
|
||||
|
||||
@ -60,10 +60,10 @@ export class CacheInterceptor implements NestInterceptor {
|
||||
const cachedData = await this.cache.get(cacheKey);
|
||||
|
||||
if (cachedData) {
|
||||
this.logger.debug(`cache ${cacheKey} hit`);
|
||||
this.logger.verbose(`cache ${cacheKey} hit`);
|
||||
return of(cachedData);
|
||||
} else {
|
||||
this.logger.debug(`cache ${cacheKey} miss`);
|
||||
this.logger.verbose(`cache ${cacheKey} miss`);
|
||||
return next.handle().pipe(
|
||||
mergeMap(async result => {
|
||||
await this.cache.set(cacheKey, result);
|
||||
|
@ -52,7 +52,7 @@ export function registerCopilotProvider<
|
||||
);
|
||||
}
|
||||
const instance = new provider(providerConfig as C);
|
||||
logger.log(
|
||||
logger.debug(
|
||||
`Copilot provider ${type} registered, capabilities: ${provider.capabilities.join(', ')}`
|
||||
);
|
||||
|
||||
|
@ -42,7 +42,7 @@ export class RedisMutexLocker implements ILocker {
|
||||
|
||||
async lock(owner: string, key: string): Promise<Lock> {
|
||||
const lockKey = `MutexLock:${key}`;
|
||||
this.logger.debug(`Client ${owner} is trying to lock resource ${key}`);
|
||||
this.logger.verbose(`Client ${owner} is trying to lock resource ${key}`);
|
||||
|
||||
const success = await this.redis.sendCommand(
|
||||
new Command('EVAL', [lockScript, '1', lockKey, owner])
|
||||
|
Loading…
Reference in New Issue
Block a user