diff --git a/02-filter-a-log-file/chains_parser/parser.js b/02-filter-a-log-file/chains_parser/parser.js index e54d7ae..94b23ec 100644 --- a/02-filter-a-log-file/chains_parser/parser.js +++ b/02-filter-a-log-file/chains_parser/parser.js @@ -174,13 +174,15 @@ const parse_log_file = async (results, stats, file_name, errors) => { parser.start(line); const data = parser.parse(); - - // skip lines that have content we don't care about - if(data.url.match(skip)) continue; - // convert the date to a only day length const date_key = format(data.time, "yyyy-MM-dd"); + // skip lines that have content we don't care about + if(data.url.match(skip)) { + stats.excluded += 1; + continue; + } + // get the date entry or a new one const date_entry = results[date_key] || {}; diff --git a/02-filter-a-log-file/chains_parser/reporter.js b/02-filter-a-log-file/chains_parser/reporter.js index 32d5884..f30b106 100644 --- a/02-filter-a-log-file/chains_parser/reporter.js +++ b/02-filter-a-log-file/chains_parser/reporter.js @@ -58,6 +58,8 @@ for(let key of keys) { } } +console.log("FROM", keys[0], "TO", keys[keys.length - 1]); + for(let [chain, counts] of Object.entries(by_chain)) { if(counts.length > OPTS.maxDays) { console.log(chain);