PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/avalanche/examples/admin

Просмотр файла: setLoggerLevel.ts

import { Avalanche } from "avalanche/dist"
import { AdminAPI } from "avalanche/dist/apis/admin"
import { SetLoggerLevelResponse } from "avalanche/dist/apis/admin/interfaces"

const ip: string = "localhost"
const port: number = 9650
const protocol: string = "http"
const networkID: number = 1337
const avalanche: Avalanche = new Avalanche(ip, port, protocol, networkID)
const admin: AdminAPI = avalanche.Admin()

const main = async (): Promise<any> => {
  const loggerName: string = "C"
  const logLevel: string = "DEBUG"
  const displayLevel: string = "INFO"
  const loggerLevel: SetLoggerLevelResponse = await admin.setLoggerLevel(
    loggerName,
    logLevel,
    displayLevel
  )
  console.log(loggerLevel)
}

main()

Выполнить команду


Для локальной разработки. Не используйте в интернете!