fixed logger to output cleaner to console
This commit is contained in:
parent
7eeccfe8f2
commit
9b13ac4680
4 changed files with 272 additions and 10 deletions
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue