Skip to content

Commit

Permalink
refactor: arp log writer 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
inferior3x committed Dec 13, 2024
1 parent 3fa219e commit e11fb77
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,12 @@ private void scan() {
private Set<ManagedLog> getLogsFromProcess(ArpLogProcess process){
Set<ManagedLog> logs = process.resultList().stream()
.filter(parser::validate)
.map(line -> {
ManagedLog log = parser.parse(line);
//ssid도 넣어줌
log.setSsid(process.getInfo().ni().getEssid());
return log;
})
.map(parser::parse)
.collect(Collectors.toSet());//Set으로 중복 제거
log.info("[managed - arp({})] log to save : {}", process.getInfo().ni().getEssid(), logs.size());

String ssid = process.getInfo().ni().getEssid();
logs.forEach(log->log.setSsid(ssid));
log.info("[managed - arp({})] log to save : {}", ssid, logs.size());
return logs;
}
}

0 comments on commit e11fb77

Please sign in to comment.