updated loggers to getLogger
This commit is contained in:
parent
1ccdbddb71
commit
2aaeba2f6c
16 changed files with 72 additions and 97 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Logger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import type { HealthStatus, PerformanceMetrics, QueryResult } from './types';
|
||||
|
||||
// Interface to avoid circular dependency
|
||||
|
|
@ -14,7 +14,7 @@ interface QuestDBClientInterface {
|
|||
* automatic recovery capabilities for the QuestDB client.
|
||||
*/
|
||||
export class QuestDBHealthMonitor {
|
||||
private readonly logger: Logger;
|
||||
private readonly logger: ReturnType<typeof getLogger>;
|
||||
private healthCheckInterval: NodeJS.Timeout | null = null;
|
||||
private lastHealthCheck: Date | null = null;
|
||||
private performanceMetrics: PerformanceMetrics = {
|
||||
|
|
@ -27,7 +27,7 @@ export class QuestDBHealthMonitor {
|
|||
memoryUsage: 0
|
||||
};
|
||||
constructor(private readonly client: QuestDBClientInterface) {
|
||||
this.logger = new Logger('QuestDBHealthMonitor');
|
||||
this.logger = getLogger('questdb-health-monitor');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Logger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import type {
|
||||
InfluxLineData,
|
||||
InfluxWriteOptions,
|
||||
|
|
@ -17,7 +17,7 @@ interface QuestDBClientInterface {
|
|||
* which QuestDB supports natively for optimal time-series data insertion.
|
||||
*/
|
||||
export class QuestDBInfluxWriter {
|
||||
private readonly logger: Logger;
|
||||
private readonly logger: ReturnType<typeof getLogger>;
|
||||
private writeBuffer: string[] = [];
|
||||
private flushTimer: NodeJS.Timeout | null = null;
|
||||
private readonly defaultOptions: Required<InfluxWriteOptions> = {
|
||||
|
|
@ -29,7 +29,7 @@ export class QuestDBInfluxWriter {
|
|||
retryDelay: 1000
|
||||
};
|
||||
constructor(private readonly client: QuestDBClientInterface) {
|
||||
this.logger = new Logger('QuestDBInfluxWriter');
|
||||
this.logger = getLogger('questdb-influx-writer');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Logger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import type {
|
||||
QueryResult,
|
||||
TimeSeriesQuery,
|
||||
|
|
@ -19,7 +19,7 @@ interface QuestDBClientInterface {
|
|||
* with support for QuestDB-specific functions and optimizations.
|
||||
*/
|
||||
export class QuestDBQueryBuilder {
|
||||
private readonly logger: Logger;
|
||||
private readonly logger: ReturnType<typeof getLogger>;
|
||||
private query!: {
|
||||
select: string[];
|
||||
from: string;
|
||||
|
|
@ -32,7 +32,7 @@ export class QuestDBQueryBuilder {
|
|||
timeRange?: TimeRange;
|
||||
};
|
||||
constructor(private readonly client: QuestDBClientInterface) {
|
||||
this.logger = new Logger('QuestDBQueryBuilder');
|
||||
this.logger = getLogger('questdb-query-builder');
|
||||
this.reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Logger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import type { TableSchema, IndexDefinition, TableNames, QueryResult } from './types';
|
||||
|
||||
// Interface to avoid circular dependency
|
||||
|
|
@ -13,10 +13,10 @@ interface QuestDBClientInterface {
|
|||
* for time-series data storage in QuestDB.
|
||||
*/
|
||||
export class QuestDBSchemaManager {
|
||||
private readonly logger: Logger;
|
||||
private readonly logger: ReturnType<typeof getLogger>;
|
||||
private readonly schemas: Map<string, TableSchema> = new Map();
|
||||
constructor(private readonly client: QuestDBClientInterface) {
|
||||
this.logger = new Logger('QuestDBSchemaManager');
|
||||
this.logger = getLogger('questdb-schema-manager');
|
||||
this.initializeSchemas();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue