updated loggers to getLogger
This commit is contained in:
parent
1ccdbddb71
commit
2aaeba2f6c
16 changed files with 72 additions and 97 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { MongoClient, Db, Collection, MongoClientOptions, Document, WithId, OptionalUnlessRequiredId } from 'mongodb';
|
||||
import { mongodbConfig } from '@stock-bot/config';
|
||||
import { Logger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import type {
|
||||
MongoDBClientConfig,
|
||||
MongoDBConnectionOptions,
|
||||
|
|
@ -28,7 +28,7 @@ export class MongoDBClient {
|
|||
private db: Db | null = null;
|
||||
private readonly config: MongoDBClientConfig;
|
||||
private readonly options: MongoDBConnectionOptions;
|
||||
private readonly logger: Logger;
|
||||
private readonly logger: ReturnType<typeof getLogger>;
|
||||
private readonly healthMonitor: MongoDBHealthMonitor;
|
||||
private isConnected = false;
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ export class MongoDBClient {
|
|||
...options
|
||||
};
|
||||
|
||||
this.logger = new Logger('MongoDBClient');
|
||||
this.logger = getLogger('mongodb-client');
|
||||
this.healthMonitor = new MongoDBHealthMonitor(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue