mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
Merge pull request #832 from deivisonrpg/change-cache-logs-level
[Proposta] Alterar level dos logs do cache para verbose
This commit is contained in:
commit
3b9761992a
@ -7,9 +7,9 @@ export class CacheService {
|
|||||||
|
|
||||||
constructor(private readonly cache: ICache) {
|
constructor(private readonly cache: ICache) {
|
||||||
if (cache) {
|
if (cache) {
|
||||||
this.logger.info(`cacheservice created using cache engine: ${cache.constructor?.name}`);
|
this.logger.verbose(`cacheservice created using cache engine: ${cache.constructor?.name}`);
|
||||||
} else {
|
} else {
|
||||||
this.logger.info(`cacheservice disabled`);
|
this.logger.verbose(`cacheservice disabled`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
src/cache/cacheengine.ts
vendored
6
src/cache/cacheengine.ts
vendored
@ -5,7 +5,7 @@ import { Logger } from '@config/logger.config';
|
|||||||
import { LocalCache } from './localcache';
|
import { LocalCache } from './localcache';
|
||||||
import { RedisCache } from './rediscache';
|
import { RedisCache } from './rediscache';
|
||||||
|
|
||||||
const logger = new Logger('Redis');
|
const logger = new Logger('CacheEngine');
|
||||||
|
|
||||||
export class CacheEngine {
|
export class CacheEngine {
|
||||||
private engine: ICache;
|
private engine: ICache;
|
||||||
@ -14,12 +14,14 @@ export class CacheEngine {
|
|||||||
const cacheConf = configService.get<CacheConf>('CACHE');
|
const cacheConf = configService.get<CacheConf>('CACHE');
|
||||||
|
|
||||||
if (cacheConf?.REDIS?.ENABLED && cacheConf?.REDIS?.URI !== '') {
|
if (cacheConf?.REDIS?.ENABLED && cacheConf?.REDIS?.URI !== '') {
|
||||||
|
logger.verbose(`RedisCache initialized for ${module}`);
|
||||||
this.engine = new RedisCache(configService, module);
|
this.engine = new RedisCache(configService, module);
|
||||||
} else if (cacheConf?.LOCAL?.ENABLED) {
|
} else if (cacheConf?.LOCAL?.ENABLED) {
|
||||||
|
logger.verbose(`LocalCache initialized for ${module}`);
|
||||||
this.engine = new LocalCache(configService, module);
|
this.engine = new LocalCache(configService, module);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`RedisCache initialized for ${module}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public getEngine() {
|
public getEngine() {
|
||||||
|
Loading…
Reference in New Issue
Block a user