diff --git a/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java b/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java index be6915a..73c569a 100644 --- a/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java +++ b/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java @@ -45,7 +45,8 @@ public class AutomaticLogDeleter extends JavaPlugin { fileName = file.getName(); //if file is not a log file - if (!fileName.endsWith(".log") && !fileName.endsWith(".log.gz")) { + //using contains to make it more likely to catch different types of logging systems + if (!fileName.contains(".log")) { continue; } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index baf0b70..d652eae 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -11,3 +11,9 @@ delete-logs-older-than-seconds: 86400 #default value: false also-delete-logs-on-shutdown: false + +#list of directories to check for logs +#note it will only delete files that contain ".log" in their name for safety reasons +#not yet implemented +check-directories-for-logs: + - "logs"