Skip to content

Commit

Permalink
Adds logger to client
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantina Blazhukova <[email protected]>
  • Loading branch information
konstantinabl committed Oct 22, 2024
1 parent 1e37cc6 commit eb7afd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/relay/src/lib/services/hapiService/hapiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import HbarLimit from '../../hbarlimiter';
import { Counter, Registry } from 'prom-client';
import { SDKClient } from '../../clients/sdkClient';
import { CacheService } from '../cacheService/cacheService';
import { AccountId, Client, PrivateKey } from '@hashgraph/sdk';
import { AccountId, Client, LogLevel, PrivateKey, Logger as SDKLogger } from '@hashgraph/sdk';
import fs from 'fs';

export default class HAPIService {
Expand Down Expand Up @@ -262,7 +262,8 @@ export default class HAPIService {

const SDK_REQUEST_TIMEOUT = parseInt(process.env.SDK_REQUEST_TIMEOUT || '10000');
client.setRequestTimeout(SDK_REQUEST_TIMEOUT);

const sdkLogger = new SDKLogger(LogLevel.Debug);
client.setLogger(sdkLogger);
logger.info(
`SDK client successfully configured to ${JSON.stringify(hederaNetwork)} for account ${
client.operatorAccountId
Expand Down

0 comments on commit eb7afd5

Please sign in to comment.