mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
style(common): remove console log, update error message
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { Logger } from '../../services/logger.service';
|
||||
import { Inject, Injectable, Optional } from '../../decorators';
|
||||
import {
|
||||
CallHandler,
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
HttpServer,
|
||||
NestInterceptor,
|
||||
} from '../../interfaces';
|
||||
import { Logger } from '../../services/logger.service';
|
||||
import { isFunction, isNil } from '../../utils/shared.utils';
|
||||
import {
|
||||
CACHE_KEY_METADATA,
|
||||
@@ -60,8 +60,10 @@ export class CacheInterceptor implements NestInterceptor {
|
||||
try {
|
||||
await this.cacheManager.set(...args);
|
||||
} catch (err) {
|
||||
Logger.error(`key: ${key} value: ${response}`, 'CacheInterceptor');
|
||||
console.error(err);
|
||||
Logger.error(
|
||||
`An error has occured when inserting "key: ${key}", "value: ${response}"`,
|
||||
'CacheInterceptor',
|
||||
);
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user