import { Dcomm } from "dcomm/dist"
import { AdminAPI } from "dcomm/dist/apis/admin"
import { SetLoggerLevelResponse } from "dcomm/dist/apis/admin/interfaces"

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

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

main()
