mirror of
https://github.com/Febbweiss/logstash-forwarder-java.git
synced 2026-03-04 14:15:42 +00:00
Changed dead time type from int to long
This commit is contained in:
@@ -77,7 +77,7 @@ public class FileWatcher {
|
||||
printWatchMap();
|
||||
}
|
||||
|
||||
public void addFilesToWatch(String fileToWatch, Event fields, int deadTime) {
|
||||
public void addFilesToWatch(String fileToWatch, Event fields, long deadTime) {
|
||||
try {
|
||||
if(fileToWatch.equals("-")) {
|
||||
addStdIn(fields);
|
||||
@@ -220,7 +220,7 @@ public class FileWatcher {
|
||||
removeMarkedFilesFromWatchMap();
|
||||
}
|
||||
|
||||
private void addSingleFile(String fileToWatch, Event fields, int deadTime) throws Exception {
|
||||
private void addSingleFile(String fileToWatch, Event fields, long deadTime) throws Exception {
|
||||
logger.info("Watching file : " + new File(fileToWatch).getCanonicalPath());
|
||||
String directory = FilenameUtils.getFullPath(fileToWatch);
|
||||
String fileName = FilenameUtils.getName(fileToWatch);
|
||||
@@ -231,7 +231,7 @@ public class FileWatcher {
|
||||
initializeWatchMap(new File(directory), fileFilter, fields);
|
||||
}
|
||||
|
||||
private void addWildCardFiles(String filesToWatch, Event fields, int deadTime) throws Exception {
|
||||
private void addWildCardFiles(String filesToWatch, Event fields, long deadTime) throws Exception {
|
||||
logger.info("Watching wildcard files : " + filesToWatch);
|
||||
String directory = FilenameUtils.getFullPath(filesToWatch);
|
||||
String wildcard = FilenameUtils.getName(filesToWatch);
|
||||
|
||||
@@ -50,8 +50,8 @@ public class FilesSection {
|
||||
return deadTime;
|
||||
}
|
||||
|
||||
public int getDeadTimeInSeconds() {
|
||||
int deadTimeInSeconds = 0;
|
||||
public long getDeadTimeInSeconds() {
|
||||
long deadTimeInSeconds = 0;
|
||||
String remaining = deadTime;
|
||||
|
||||
if(deadTime.contains("h")) {
|
||||
|
||||
Reference in New Issue
Block a user