From 3bc224b779e40d7cefcd6433e4f09c8bd4119bc6 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 13 Jul 2024 23:25:21 +0200 Subject: [PATCH] Rename package from http to httpaccess. --- .../{http => httpaccess}/HttpAccessLog.java | 4 +- .../HttpAccessLogAnalyzer.java | 19 ++++---- .../HttpAccessLogIterator.java | 46 ++++++++++++------- .../HttpAccessLogParser.java | 4 +- .../HttpAccessLogStat.java | 4 +- .../{http => httpaccess}/HttpAccessLogs.java | 4 +- .../{http => httpaccess}/HttpLogIterator.java | 0 .../{http => httpaccess}/HttpMethod.java | 4 +- .../{http => httpaccess}/HttpStatus.java | 4 +- .../HttpStatusCategory.java | 4 +- .../{http => httpaccess}/HttpStatusTable.java | 12 ++--- .../NGinxLogAnalyzer.java | 0 .../{http => httpaccess}/UserAgent.java | 4 +- .../UserAgentBotDetector.java | 4 +- .../UserAgentBrowser.java | 4 +- .../{http => httpaccess}/UserAgentDevice.java | 4 +- .../{http => httpaccess}/UserAgentOS.java | 4 +- .../{http => httpaccess}/UserAgentType.java | 4 +- .../metrics/{http => httpaccess}/Visit.java | 4 +- .../{http => httpaccess}/VisitCounters.java | 4 +- .../{http => httpaccess}/VisitorCounters.java | 4 +- .../metrics/{http => httpaccess}/Visits.java | 4 +- .../userAgentBotDetectorData.txt | 0 .../metrics/xmpp/XmppHttpLogAnalyzer.java | 6 +-- .../UserAgentBotDetectorTest.java | 0 .../VisitCountersTest.java | 0 26 files changed, 84 insertions(+), 67 deletions(-) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpAccessLog.java (98%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpAccessLogAnalyzer.java (94%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpAccessLogIterator.java (86%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpAccessLogParser.java (97%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpAccessLogStat.java (93%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpAccessLogs.java (97%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpLogIterator.java (100%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpMethod.java (92%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpStatus.java (94%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpStatusCategory.java (96%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/HttpStatusTable.java (97%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/NGinxLogAnalyzer.java (100%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgent.java (98%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgentBotDetector.java (95%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgentBrowser.java (88%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgentDevice.java (87%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgentOS.java (88%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgentType.java (88%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/Visit.java (97%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/VisitCounters.java (97%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/VisitorCounters.java (96%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/Visits.java (97%) rename src/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/userAgentBotDetectorData.txt (100%) rename test/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/UserAgentBotDetectorTest.java (100%) rename test/fr/devinsy/statoolinfos/metrics/{http => httpaccess}/VisitCountersTest.java (100%) diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java similarity index 98% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java index ef102ac..8b84263 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.time.LocalDateTime; import java.time.ZoneId; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogAnalyzer.java similarity index 94% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogAnalyzer.java index 8dc62ab..12a8f8c 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogAnalyzer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.io.IOException; import java.util.regex.Matcher; @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.statoolinfos.metrics.IpCounters; import fr.devinsy.statoolinfos.metrics.PathCounters; +import fr.devinsy.strings.StringList; /** * The Class HttpAccessLogProber. @@ -305,9 +306,6 @@ public class HttpAccessLogAnalyzer this.counters.inc("metrics.http.devices." + device.toString().toLowerCase(), year, yearMonth, yearWeek, date); // metrics.http.countries.XX = - - // metrics.http.errors.* = - // metrics.http.errors.php.* = } } @@ -367,13 +365,18 @@ public class HttpAccessLogAnalyzer HttpAccessLogAnalyzer analyzer = new HttpAccessLogAnalyzer(); - for (HttpAccessLog log : logs) + HttpAccessLogIterator logIterator = (HttpAccessLogIterator) logs.iterator(); + while (logIterator.hasNext()) { - analyzer.probeLog(log); + analyzer.probeLog(logIterator.next()); } - result = analyzer.getCounters(); + StringList timemarks = result.getNowTimeMarks(); + analyzer.getCounters().set(logIterator.getLogCount(), "metrics.http.logs.count", timemarks); + analyzer.getCounters().set(logIterator.getIgnoredLogCount(), "metrics.http.logs.ignored", timemarks); + analyzer.getCounters().set(logIterator.getFailedLogCount(), "metrics.http.logs.failed", timemarks); + // return result; } diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogIterator.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogIterator.java similarity index 86% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogIterator.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogIterator.java index 73d83ba..7fef2ed 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogIterator.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.io.IOException; import java.time.format.DateTimeFormatter; @@ -43,8 +43,9 @@ public class HttpAccessLogIterator implements Iterator private DateTimeFormatter dateTimeFormatter; private Pattern requestFilter; private HttpAccessLog nextLog; - private int errorCount; - private int ignoredLineCount; + private int logCount; + private int ignoredLogCount; + private int failedLogCount; /** * Instantiates a new http access log iterator. @@ -92,8 +93,9 @@ public class HttpAccessLogIterator implements Iterator { this.lineIterator = new FilesLineIterator(source); this.nextLog = null; - this.errorCount = 0; - this.ignoredLineCount = 0; + this.logCount = 0; + this.ignoredLogCount = 0; + this.failedLogCount = 0; if (StringUtils.isBlank(linePattern)) { @@ -134,23 +136,33 @@ public class HttpAccessLogIterator implements Iterator } /** - * Gets the error count. + * Gets the failed log count. * - * @return the error count + * @return the failed log count */ - public int getErrorCount() + public int getFailedLogCount() { - return this.errorCount; + return this.failedLogCount; } /** - * Gets the ignored line count. + * Gets the ignored log count. * - * @return the ignored line count + * @return the ignored log count */ - public int getIgnoredLineCount() + public int getIgnoredLogCount() { - return this.ignoredLineCount; + return this.ignoredLogCount; + } + + /** + * Gets the log count. + * + * @return the log count + */ + public int getLogCount() + { + return this.logCount; } /* (non-Javadoc) @@ -206,6 +218,7 @@ public class HttpAccessLogIterator implements Iterator if (this.lineIterator.hasNext()) { String line = this.lineIterator.next(); + this.logCount += 1; try { @@ -213,7 +226,7 @@ public class HttpAccessLogIterator implements Iterator if (log == null) { logger.warn("LINE IS NOT MATCHING [{}]", line); - this.errorCount += 1; + this.failedLogCount += 1; } else if ((this.requestFilter == null) || (this.requestFilter.matcher(log.getRequest()).matches())) { @@ -222,13 +235,14 @@ public class HttpAccessLogIterator implements Iterator } else { - this.ignoredLineCount += 1; + this.ignoredLogCount += 1; // System.out.println("XX " + log.getRequest()); } } catch (Exception exception) { logger.warn("Error parsing line [{}][{}]", line, exception.getMessage()); + this.failedLogCount += 1; // exception.printStackTrace(); } } diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogParser.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java similarity index 97% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogParser.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java index 249fc5e..427f60e 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogParser.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.time.LocalDateTime; import java.time.ZonedDateTime; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogStat.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogStat.java similarity index 93% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogStat.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogStat.java index f6654df..bca226d 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogStat.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogStat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogs.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java similarity index 97% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogs.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java index 720d4b1..fd4f222 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogs.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.io.File; import java.io.IOException; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpLogIterator.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpLogIterator.java similarity index 100% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpLogIterator.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpLogIterator.java diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpMethod.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpMethod.java similarity index 92% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpMethod.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpMethod.java index f43b40a..2ec3faa 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpMethod.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; /** * The Class HttpMethod. diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpStatus.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java similarity index 94% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpStatus.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java index aaaa362..2a88796 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpStatus.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpStatusCategory.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java similarity index 96% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpStatusCategory.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java index 686cd89..119ec66 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpStatusCategory.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; /** * The Enum HttpStatusCategory. diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpStatusTable.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusTable.java similarity index 97% rename from src/fr/devinsy/statoolinfos/metrics/http/HttpStatusTable.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusTable.java index 020242c..59e8c36 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpStatusTable.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusTable.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.util.HashMap; import java.util.regex.Pattern; @@ -29,15 +29,15 @@ import org.slf4j.LoggerFactory; */ public class HttpStatusTable { - private static Logger logger = LoggerFactory.getLogger(HttpStatusTable.class); - - public static final Pattern HTTP_CODE_PATTERN = Pattern.compile("\\d{3}"); - private static class SingletonHolder { private static final HttpStatusTable instance = new HttpStatusTable(); } + private static Logger logger = LoggerFactory.getLogger(HttpStatusTable.class); + + public static final Pattern HTTP_CODE_PATTERN = Pattern.compile("\\d{3}"); + private HashMap codes; /** diff --git a/src/fr/devinsy/statoolinfos/metrics/http/NGinxLogAnalyzer.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/NGinxLogAnalyzer.java similarity index 100% rename from src/fr/devinsy/statoolinfos/metrics/http/NGinxLogAnalyzer.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/NGinxLogAnalyzer.java diff --git a/src/fr/devinsy/statoolinfos/metrics/http/UserAgent.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgent.java similarity index 98% rename from src/fr/devinsy/statoolinfos/metrics/http/UserAgent.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgent.java index cae8dfe..3d52ec8 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/UserAgent.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentBotDetector.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBotDetector.java similarity index 95% rename from src/fr/devinsy/statoolinfos/metrics/http/UserAgentBotDetector.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBotDetector.java index 79fc930..2b812a4 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentBotDetector.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBotDetector.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.io.IOException; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentBrowser.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBrowser.java similarity index 88% rename from src/fr/devinsy/statoolinfos/metrics/http/UserAgentBrowser.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBrowser.java index 77b197f..d08eea7 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentBrowser.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBrowser.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; /** * The Enum UserAgentBrowser. diff --git a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentDevice.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentDevice.java similarity index 87% rename from src/fr/devinsy/statoolinfos/metrics/http/UserAgentDevice.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentDevice.java index 4d33362..1ee8f2a 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentDevice.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentDevice.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; /** * The Enum UserAgentDevice. diff --git a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentOS.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentOS.java similarity index 88% rename from src/fr/devinsy/statoolinfos/metrics/http/UserAgentOS.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentOS.java index f6d9238..9ce5a5e 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentOS.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentOS.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; /** * The Enum UserAgentOS. diff --git a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentType.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentType.java similarity index 88% rename from src/fr/devinsy/statoolinfos/metrics/http/UserAgentType.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentType.java index b56ff1f..332f5a9 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/UserAgentType.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; /** * The Enum UserAgentType. diff --git a/src/fr/devinsy/statoolinfos/metrics/http/Visit.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/Visit.java similarity index 97% rename from src/fr/devinsy/statoolinfos/metrics/http/Visit.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/Visit.java index e10c802..f635191 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/Visit.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/Visit.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.time.Duration; import java.time.LocalDate; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/VisitCounters.java similarity index 97% rename from src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/VisitCounters.java index d9039e2..fddeacd 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/VisitCounters.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.time.LocalDate; import java.time.YearMonth; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/VisitorCounters.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/VisitorCounters.java similarity index 96% rename from src/fr/devinsy/statoolinfos/metrics/http/VisitorCounters.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/VisitorCounters.java index b8501ac..c14d1cd 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/VisitorCounters.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/VisitorCounters.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.util.HashMap; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/Visits.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/Visits.java similarity index 97% rename from src/fr/devinsy/statoolinfos/metrics/http/Visits.java rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/Visits.java index decd672..e617942 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/Visits.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/Visits.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with StatoolInfos. If not, see . */ -package fr.devinsy.statoolinfos.metrics.http; +package fr.devinsy.statoolinfos.metrics.httpaccess; import java.time.Duration; import java.time.LocalDate; diff --git a/src/fr/devinsy/statoolinfos/metrics/http/userAgentBotDetectorData.txt b/src/fr/devinsy/statoolinfos/metrics/httpaccess/userAgentBotDetectorData.txt similarity index 100% rename from src/fr/devinsy/statoolinfos/metrics/http/userAgentBotDetectorData.txt rename to src/fr/devinsy/statoolinfos/metrics/httpaccess/userAgentBotDetectorData.txt diff --git a/src/fr/devinsy/statoolinfos/metrics/xmpp/XmppHttpLogAnalyzer.java b/src/fr/devinsy/statoolinfos/metrics/xmpp/XmppHttpLogAnalyzer.java index 2391350..8ef0a08 100644 --- a/src/fr/devinsy/statoolinfos/metrics/xmpp/XmppHttpLogAnalyzer.java +++ b/src/fr/devinsy/statoolinfos/metrics/xmpp/XmppHttpLogAnalyzer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -27,8 +27,8 @@ import org.slf4j.LoggerFactory; import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.statoolinfos.metrics.PathCounters; import fr.devinsy.statoolinfos.metrics.UserCounters; -import fr.devinsy.statoolinfos.metrics.http.HttpAccessLog; -import fr.devinsy.statoolinfos.metrics.http.HttpAccessLogIterator; +import fr.devinsy.statoolinfos.metrics.httpaccess.HttpAccessLog; +import fr.devinsy.statoolinfos.metrics.httpaccess.HttpAccessLogIterator; import fr.devinsy.statoolinfos.util.Files; /** diff --git a/test/fr/devinsy/statoolinfos/metrics/http/UserAgentBotDetectorTest.java b/test/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBotDetectorTest.java similarity index 100% rename from test/fr/devinsy/statoolinfos/metrics/http/UserAgentBotDetectorTest.java rename to test/fr/devinsy/statoolinfos/metrics/httpaccess/UserAgentBotDetectorTest.java diff --git a/test/fr/devinsy/statoolinfos/metrics/http/VisitCountersTest.java b/test/fr/devinsy/statoolinfos/metrics/httpaccess/VisitCountersTest.java similarity index 100% rename from test/fr/devinsy/statoolinfos/metrics/http/VisitCountersTest.java rename to test/fr/devinsy/statoolinfos/metrics/httpaccess/VisitCountersTest.java