chore: adjust log level (#6913)

This commit is contained in:
darkskygit 2024-05-14 09:32:28 +00:00
parent b8333de119
commit 8881286025
No known key found for this signature in database
GPG Key ID: 97B7D036B1566E9D
5 changed files with 12 additions and 8 deletions

View File

@ -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}.`
);
}
}

View File

@ -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;

View File

@ -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);

View File

@ -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(', ')}`
);

View File

@ -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])