Skip to content

Commit d5f4f9a

Browse files
committed
14th commit - little refactors and deletion of unused variables and imports.
1 parent 2415f8b commit d5f4f9a

11 files changed

Lines changed: 1 addition & 26 deletions

src/main/java/com/project/authapi/system_log_analyzer/SystemLogAnalyzerApp.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.project.authapi.system_log_analyzer;
22

3-
import com.project.authapi.system_log_analyzer.core.FileLoggerService;
4-
import com.project.authapi.system_log_analyzer.core.LogReaderService;
53
import javafx.application.Application;
64
import javafx.fxml.FXMLLoader;
75
import javafx.scene.Parent;
@@ -11,8 +9,6 @@
119
import org.springframework.boot.builder.SpringApplicationBuilder;
1210
import org.springframework.context.ConfigurableApplicationContext;
1311

14-
import static javafx.application.Application.launch;
15-
1612
@SpringBootApplication
1713
public class SystemLogAnalyzerApp extends Application {
1814

src/main/java/com/project/authapi/system_log_analyzer/config/appConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import org.springframework.stereotype.Component;
44

5-
import java.io.File;
6-
75
@Component
86
public class appConfig {
97
private String logsDir;

src/main/java/com/project/authapi/system_log_analyzer/controller/LoadingBarFXController.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public class LoadingBarFXController {
3232

3333
@FXML public void initialize(){
3434
IO.println("LoadingBarFXController::initialize");
35-
System.out.println("Exporter = " + exporter);
36-
System.out.println("Config = " + config);
3735
Task<List<LogEvent>> loadingTask = new Task<>() {
3836
@Override
3937
protected List<LogEvent> call() throws Exception {

src/main/java/com/project/authapi/system_log_analyzer/controller/MainWindowFXController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import java.nio.file.Path;
1717
import java.util.ArrayList;
18-
import java.util.Formatter;
1918
import java.util.List;
2019
import java.util.Map;
2120
import java.util.stream.Collectors;

src/main/java/com/project/authapi/system_log_analyzer/core/FileLoggerService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
import com.project.authapi.system_log_analyzer.config.appConfig;
55
import org.springframework.beans.factory.annotation.Autowired;
6-
import org.springframework.context.ApplicationContext;
76
import org.springframework.stereotype.Service;
8-
97
import java.io.File;
108
import java.io.FileWriter;
119
import java.io.IOException;

src/main/java/com/project/authapi/system_log_analyzer/core/FileReportExporter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package com.project.authapi.system_log_analyzer.core;
22

33
import com.project.authapi.system_log_analyzer.config.appConfig;
4-
import com.project.authapi.system_log_analyzer.io.WindowsEventExporter;
5-
import com.project.authapi.system_log_analyzer.io.WindowsEventParser;
64
import org.springframework.beans.factory.annotation.Autowired;
75
import org.springframework.stereotype.Component;
86

97
import java.io.File;
108
import java.io.FileWriter;
119
import java.io.IOException;
12-
import java.nio.file.Path;
1310
import java.time.LocalDateTime;
1411
import java.time.format.DateTimeFormatter;
1512
import java.util.List;

src/main/java/com/project/authapi/system_log_analyzer/core/LogEvent.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.project.authapi.system_log_analyzer.core;
22

3-
4-
5-
import org.springframework.stereotype.Component;
6-
73
import java.time.LocalDateTime;
84
import java.time.format.DateTimeFormatter;
95

@@ -24,9 +20,6 @@ public record LogEvent(
2420
if (level == null)
2521
throw new IllegalArgumentException("LogLevel cannot be null.");
2622

27-
//if (message == null || message.isBlank())
28-
// throw new IllegalArgumentException("Message cannot be blank.");
29-
3023
}
3124

3225
@Override

src/main/java/com/project/authapi/system_log_analyzer/core/LogReaderService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.project.authapi.system_log_analyzer.core;
22

33
import com.project.authapi.system_log_analyzer.config.appConfig;
4-
import com.project.authapi.system_log_analyzer.io.WindowsEventExporter;
54
import org.springframework.beans.factory.annotation.Autowired;
65
import org.springframework.stereotype.Service;
76

src/main/java/com/project/authapi/system_log_analyzer/io/WindowsEventExporter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
import java.util.ArrayList;
1515
import java.util.List;
1616

17-
import static java.lang.System.err;
18-
1917
// Class responsible for exporting logs from Win PowerShell
2018
@Component
2119
public class WindowsEventExporter {

src/main/java/com/project/authapi/system_log_analyzer/io/WindowsEventParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private LogEvent parseLine(String[] columns) {
5757
if (columns.length < 5) return null;
5858

5959
if (!columns[0].matches("\\d{2}\\.\\d{2}\\.\\d{4} \\d{2}:\\d{2}:\\d{2}(,\\d{1,3})?")) {
60-
//System.out.println("(WindowsEventParser.parseLine()) Skipping non-date line: " + columns[0]);
60+
// WindowsEventParser.parseLine()) Skipping non-date line
6161
return null;
6262
}
6363

0 commit comments

Comments
 (0)