How to use the @requestnetwork/types.LogTypes.LogLevel function in @requestnetwork/types

To help you get started, we’ve selected a few @requestnetwork/types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RequestNetwork / requestNetwork / packages / request-node / src / config.ts View on Github external
export function getLogConfig(): { logLevel: LogTypes.LogLevel; logMode: modeType } {
  return {
    logLevel:
      LogTypes.LogLevel[
        (argv.logLevel || process.env.LOG_LEVEL) as keyof typeof LogTypes.LogLevel
      ] || defaultValues.log.level,
    logMode:
      modeType[(argv.logMode || process.env.LOG_MODE) as keyof typeof modeType] ||
      defaultValues.log.mode,
  };
}
github RequestNetwork / requestNetwork / packages / request-node / src / config.ts View on Github external
networkId: 0,
      web3ProviderUrl: 'http://localhost:8545',
    },
    ipfs: {
      host: 'localhost',
      port: 5001,
      protocol: 'http',
      timeout: 30000,
    },
    lastBlockNumberDelay: 10000,
    maxConcurrency: 20,
    persistTransactionTimeout: 600,
    retryDelay: 1000,
  },
  log: {
    level: LogTypes.LogLevel.INFO,
    mode: modeType.human,
  },
  server: {
    headers: '{}',
    port: 3000,
  },
  wallet: {
    mnemonic: 'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat',
  },
};

/**
 * Get the port from command line argument, environment variables or default values to allow user to connect to the server
 * @returns the port to listen to connection on the server
 */
export function getServerPort(): number {