Skip to content

Commit

Permalink
fix(logger): remove unused logger property
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Feb 14, 2024
1 parent 3adf53b commit 9501d1d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
11 changes: 0 additions & 11 deletions src/common/ArIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { ContractStateProvider } from '../types.js';
import { DefaultLogger } from './logger.js';

export class ArIO implements ContractStateProvider {
private contractStateProvider: ContractStateProvider;
private logger: DefaultLogger;

constructor({
contractStateProvider,
logger = new DefaultLogger({
level: 'debug',
logFormat: 'simple',
}),
}: {
contractStateProvider: ContractStateProvider;
logger?: DefaultLogger;
}) {
this.contractStateProvider = contractStateProvider;
this.logger = logger;
this.logger.debug(
`ArIO initialized with ${contractStateProvider.constructor.name} as contract state provider`,
);
}

/**
Expand Down
9 changes: 1 addition & 8 deletions src/common/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ export class AxiosHTTPService implements HTTPClient {
private logger: Logger;

// TODO: re-implement axios-retry. Currently that package is broken for nodenext.
constructor({
url,
logger,
}: {
url: string;

logger: Logger;
}) {
constructor({ url, logger }: { url: string; logger: Logger }) {
this.logger = logger;
this.axios = createAxiosInstance({
axiosConfig: {
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface ContractStateProvider {
*/
getContractState<T>({ contractTxId }: { contractTxId: string }): Promise<T>;
}

/* eslint-disable @typescript-eslint/no-explicit-any */
export interface Logger {
setLogLevel: (level: string) => void;
Expand Down

0 comments on commit 9501d1d

Please sign in to comment.