Skip to content

Commit

Permalink
chore(logs): support AR_IO_SDK_LOG_LEVEL
Browse files Browse the repository at this point in the history
This gives us better debug support when tracing down potential network process issues
  • Loading branch information
dtfiedler committed Jan 15, 2025
1 parent 7374f86 commit 40cd2df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ services:
- WEBHOOK_BLOCK_FILTER=${WEBHOOK_BLOCK_FILTER:-}
- CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD=${CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD:-}
- TRUSTED_ARNS_GATEWAY_URL=${TRUSTED_ARNS_GATEWAY_URL:-https://__NAME__.arweave.net}
- AR_IO_SDK_LOG_LEVEL=${AR_IO_SDK_LOG_LEVEL:-none}
- ARNS_RESOLVER_PRIORITY_ORDER=${ARNS_RESOLVER_PRIORITY_ORDER:-on-demand,gateway}
- ARNS_RESOLVER_OVERRIDE_TTL_SECONDS=${ARNS_RESOLVER_OVERRIDE_TTL_SECONDS:-}
- ARNS_CACHE_TTL_SECONDS=${ARNS_CACHE_TTL_SECONDS:-3600}
Expand Down
5 changes: 5 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,11 @@ export const WEBHOOK_BLOCK_FILTER = createFilter(
// ArNS Resolution
//

export const AR_IO_SDK_LOG_LEVEL = env.varOrDefault(
'AR_IO_SDK_LOG_LEVEL',
'none',
);

export const ARNS_CACHE_TYPE = env.varOrDefault('ARNS_CACHE_TYPE', 'node');

export const ARNS_CACHE_TTL_SECONDS = +env.varOrDefault(
Expand Down
4 changes: 3 additions & 1 deletion src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { default as Arweave } from 'arweave';
import EventEmitter from 'node:events';
import fs from 'node:fs';
import { AOProcess, ARIO } from '@ar.io/sdk';
import { AOProcess, ARIO, Logger as ARIOLogger } from '@ar.io/sdk';
import awsLite from '@aws-lite/client';
import awsLiteS3 from '@aws-lite/s3';

Expand Down Expand Up @@ -98,6 +98,8 @@ const arweave = Arweave.init({});

// IO/AO SDK

ARIOLogger.default.setLogLevel(config.AR_IO_SDK_LOG_LEVEL as any);

const arIO = ARIO.init({
process: new AOProcess({
processId: config.IO_PROCESS_ID,
Expand Down

0 comments on commit 40cd2df

Please sign in to comment.