Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function readLogsV1 (logplexURL) {
let {response} = await HTTP.stream(logplexURL)
return new Promise(function (resolve, reject) {
response.setEncoding('utf8')
liner.setEncoding('utf8')
response.pipe(liner)
liner.on('data', line => cli.log(colorize(line)))
response.on('end', resolve)
response.on('error', reject)
})
}
async function readLogsV1 (logplexURL) {
let {response} = await HTTP.stream(logplexURL)
return new Promise(function (resolve, reject) {
response.setEncoding('utf8')
liner.setEncoding('utf8')
response.pipe(liner)
liner.on('data', line => cli.log(colorize(line)))
response.on('end', resolve)
response.on('error', reject)
})
}
async function readLogsV1(logplexURL: string) {
const {response} = await HTTP.stream(logplexURL)
return new Promise(function (resolve, reject) {
response.setEncoding('utf8')
liner.setEncoding('utf8')
response.pipe(liner)
liner.on('data', line => cli.log(colorize(line)))
response.on('end', resolve)
response.on('error', reject)
})
}