This project demonstrates Data-Oriented Programming (DOP) principles applied in Java 21.
It processes log files, extracts statistics, and generates a report.
-
LogReader / FileReader
Reads log files from disk and returns raw lines. -
LogParser / DefaultLogParser
Parses each log line into a structuredLogEvent(Error, Warn, Info, Debug). -
LogProcessor
Coordinates reading and parsing across multiple files, using virtual threads for concurrency. -
LogStats
Aggregates statistics from a list ofLogEventobjects (counts of errors, warnings, infos, debugs). -
ReportGenerator
Produces a human-readable report string with the statistics. -
ConsoleWriter
Prints the report to the console. -
Main
Entry point: loads log files fromresources/logs, processes them, generates statistics, and prints the report.
- Load log file paths from
src/main/resources/logs. - Process files into
LogEventobjects. - Generate statistics (
LogStats). - Build a report (
ReportGenerator). - Print to console (
ConsoleWriter).