Add EXTENDED_LOGS
This commit is contained in:
1 parent
21b69d1e1a
commit
2981fd661e
2 files changed
+5
-2
No files matched your search
@@ -13,7 +13,7 @@ const isLocalIP = require('./scripts/utils/isLocalIP.js');
|
||||
const { parseNumber, parseTimestamp } = require('./scripts/utils/parse.js');
|
||||
const log = require('./scripts/utils/log.js');
|
||||
const config = require('./config.js');
|
||||
const { UFW_LOG_FILE, ABUSEIPDB_API_KEY, SERVER_ID, AUTO_UPDATE_ENABLED, AUTO_UPDATE_SCHEDULE, DISCORD_WEBHOOKS_ENABLED, DISCORD_WEBHOOKS_URL } = config.MAIN;
|
||||
const { UFW_LOG_FILE, ABUSEIPDB_API_KEY, SERVER_ID, EXTENDED_LOGS, AUTO_UPDATE_ENABLED, AUTO_UPDATE_SCHEDULE, DISCORD_WEBHOOKS_ENABLED, DISCORD_WEBHOOKS_URL } = config.MAIN;
|
||||
|
||||
const ABUSE_STATE = { isLimited: false, isBuffering: false, sentBulk: false };
|
||||
const RATE_LIMIT_LOG_INTERVAL = 10 * 60 * 1000;
|
||||
@@ -144,7 +144,8 @@ const processLogLine = async (line, test = false) => {
|
||||
minutes && `${minutes}m`,
|
||||
(seconds || (!days && !hours && !minutes)) && `${seconds}s`,
|
||||
].filter(Boolean).join(' ');
|
||||
log(`${srcIp} was last reported on ${new Date(lastReportedTime * 1000).toLocaleString()} (${timeAgo} ago)`);
|
||||
|
||||
if (EXTENDED_LOGS) log(`${srcIp} was last reported on ${new Date(lastReportedTime * 1000).toLocaleString()} (${timeAgo} ago)`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user