fixed logger to output cleaner to console

This commit is contained in:
Bojan Kucera 2025-06-07 08:18:14 -04:00
parent 7eeccfe8f2
commit 9b13ac4680
4 changed files with 272 additions and 10 deletions

View file

@ -1,6 +1,6 @@
import { createLogger } from '@stock-bot/logger';
import createCache, { type CacheProvider } from '@stock-bot/cache';
import { HttpClient, ProxyConfig , RequestConfig } from '@stock-bot/http-client';
import { HttpClient, HttpClientConfig, ProxyConfig , RequestConfig } from '@stock-bot/http-client';
import type { Logger as PinoLogger } from 'pino';
export interface ProxySource {
@ -79,7 +79,6 @@ export class ProxyService {
this.httpClient = new HttpClient({
timeout: this.CHECK_TIMEOUT,
retries: 1
});
this.logger.info('ProxyService initialized');
@ -265,13 +264,11 @@ export class ProxyService {
*/
async checkProxy(proxy: ProxyConfig, checkUrl: string = this.DEFAULT_CHECK_URL): Promise<ProxyCheckResult> {
const startTime = Date.now();
try {
// Create a new HttpClient instance with the proxy
const proxyClient = new HttpClient({
timeout: this.CHECK_TIMEOUT,
retries: 0,
proxy: proxy
});