Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TO-DO.md
dist
target/
app.log
.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
Expand Down
40 changes: 40 additions & 0 deletions HowToRun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## 🖥️ Installation (2 clicks — for recruiters)

The application is distributed as a **standalone EXE** built with `jpackage`.

### ✔ Requirements
Nothing except:
- Windows 10/11 (Currently on win 10 System Logs are not working - TODO)
- Local user profile
- Windows PowerShell (built-in on Windows 10/11)

> **Java is bundled inside the EXE**.
> You do NOT need to install Java.

### ✔ Running the app
1. Download `SystemLogAnalyzer.rar`
2. unpack it with winrar anywhere.
3. Double-click on SystemLogAnalyzer.exe
4. (Optional) If Security logs are selected → confirm Windows UAC popup

That's all.

## 📦 How it works

### 1. Choose:
- directory for storing exported CSVs
- directory for saving reports
- log types (Application / System / Security)

### 2. The app:
- runs PowerShell → exports CSV
- parses records
- loads them into a JavaFX table

### 3. You can:
- filter
- search
- inspect details
- refresh logs anytime

All without touching Event Viewer manually.
40 changes: 40 additions & 0 deletions HowToRun_PL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## 🖥️ Instalacja (2 kliknięcia — dla rekruterów)

Aplikacja jest dystrybuowana jako **samodzielny plik EXE** zbudowany przy użyciu `jpackage`.

### ✔ Wymagania
Nic poza:
- Windows 10/11
- Lokalnym profilem użytkownika
- Windows PowerShell (built-in on Windows 10/11)

> **Java jest dołączona do pliku EXE**.
> NIE musisz instalować Javy.

### ✔ Uruchamianie aplikacji
1. Pobierz `SystemLogAnalyzer.exe`
2. Wypakuj program w dowolne miejsce
3. Kliknij go dwukrotnie na SystemLogAnalyzer.exe
4. (Opcjonalnie) Jeśli wybrano dzienniki zabezpieczeń → potwierdź wyskakujące okienko UAC systemu Windows

To wszystko.

## 📦 Jak to działa

### 1. Wybierz:
- katalog do przechowywania wyeksportowanych plików CSV
- katalog do zapisywania raportów
- typy logów (Aplikacja/System/Zabezpieczenia)

### 2. Aplikacja:
- uruchamia program PowerShell → eksportuje plik CSV
- analizuje rekordy
- ładuje je do tabeli JavaFX

### 3. Możesz:
- filtrować
- wyszukiwać
- sprawdzać szczegóły
- odświeżać logi w dowolnym momencie

Wszystko to bez ręcznego uruchamiania Podglądu zdarzeń.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# System Log Analyzer (Work in progress — v0.1 MVP)
# System Log Analyzer (Work in progress — v0.2)

**System Log Analyzer** A standalone Windows desktop application for IT professionals to export,
parse and analyze Windows Event Logs with a fast, clean and modern UI.
Expand Down
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<dependencies>

<!-- CZYSTY SPRING (bez Boot) -->
<!-- Clear Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand Down Expand Up @@ -46,12 +46,19 @@
<version>25-ea+1</version>
</dependency>

<!-- JNA core + platform for elevating app to admin permissions -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.13.0</version>
</dependency>

</dependencies>

<build>
<plugins>

<!-- Kompilator Javy -->
<!-- Java compilator -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -71,7 +78,7 @@
</configuration>
</plugin>

<!-- Wyłącz testy przy build -->
<!-- mvn skip tests (because there is none . . . yet!)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,61 @@
import javafx.stage.Stage;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

public class SystemLogAnalyzerApp extends Application {

private boolean app_Log = false;

private AnnotationConfigApplicationContext springContext;

private static Boolean elevatedFlag = false; // Admin permissions

@Override
public void init() {
springContext = new AnnotationConfigApplicationContext(SpringConfig.class);

if (app_Log) { // debug app.log in main directory
PrintStream out = null;
try {
out = new PrintStream(new FileOutputStream("app.log", true), true);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
System.setOut(out);
System.setErr(out);
}



}

@Override
public void start(Stage primaryStage) throws Exception {
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/WelcomeView.fxml"));
loader.setControllerFactory(springContext::getBean);

Parent root = loader.load();
boolean elevated = getParameters().getRaw().contains("--elevated");
elevatedFlag = elevated; // Admin profile checker

System.out.println("ARGS = " + getParameters().getRaw()); // Admin permission check to debug file

com.project.system_log_analyzer.config.appConfig cfg = springContext.getBean(com.project.system_log_analyzer.config.appConfig.class);

if (elevated) {
cfg.setCsvSecurity(true);
}

try {
cfg.setCsvSecurity(elevated);
IO.println("Elevated mode: " + elevated);
} catch (Exception e) {
System.err.println("Could not set elevated flag in appConfig: " + e.getMessage());
}

Parent root = loader.load();
SpringConfig.APP_READY = true;

Scene scene = new Scene(root);
Expand All @@ -37,6 +76,10 @@ public void stop() {
springContext.close();
}

public static boolean isElevated() {
return Boolean.TRUE.equals(elevatedFlag);
}

public static void main(String[] args) {
launch(args);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.project.system_log_analyzer.config;


import com.project.system_log_analyzer.SystemLogAnalyzerApp;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@ public class appConfig {
private boolean csvApplication;
private boolean csvSystem;
private boolean csvSecurity;
private boolean noLogs;
private boolean saveInExeDir;
private boolean relaunch;

public boolean isRelaunch() {
return relaunch;
}

public void setRelaunch(boolean relaunch) {
this.relaunch = relaunch;
}

public boolean isNoLogs() {
return noLogs;
}

public void setNoLogs(boolean noLogs) {
this.noLogs = noLogs;
}

public boolean isSaveInExeDir() {
return saveInExeDir;
}

public void setSaveInExeDir(boolean saveInExeDir) {
this.saveInExeDir = saveInExeDir;
}

public boolean isCsvSecurity() {
return csvSecurity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ public void onRefreshClick() {
refreshButton.setDisable(true);
logTable.setDisable(true);
loadingLabel.setText("Refreshing logs… Please wait. (Time of loading depends on number of logs)");
logTable.getSelectionModel().clearSelection();
logTable.getFocusModel().focus(-1); // Details unexpected pop-up || Fixed
onClearFilters(); // Clear all filters

Task<List<LogEvent>> task = new Task<List<LogEvent>>() {
@Override
Expand Down Expand Up @@ -222,6 +225,8 @@ protected List<LogEvent> call() throws Exception {
}
@FXML
public void onSearchChanged() {
logTable.getSelectionModel().clearSelection();
logTable.getFocusModel().focus(-1); // Details unexpected pop-up || Fixed
applyFilters();
}

Expand All @@ -244,6 +249,9 @@ public void onFilterChanged() {
private void applyFilters() {
if (logs == null) return;

logTable.getSelectionModel().clearSelection();
logTable.getFocusModel().focus(-1);

String input = searchField.getText().toLowerCase().trim();

// input correctness check
Expand Down
Loading