1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 04:20:05 +00:00

chore(*): refactor to use logger if available

This commit is contained in:
Krishna Acondy
2021-06-25 09:14:29 +01:00
parent 97d45e87ec
commit 2b16be3aef
4 changed files with 20 additions and 9 deletions

View File

@@ -15,12 +15,14 @@ export const fetchLogByChunks = async (
logUrl: string,
logCount: number
): Promise<string> => {
const logger = process.logger || console
let log: string = ''
const loglimit = logCount < 10000 ? logCount : 10000
let start = 0
do {
console.log(
logger.info(
`Fetching logs from line no: ${start + 1} to ${
start + loglimit
} of ${logCount}.`