Skip to content

A CLI application for parsing and aggregating heterogeneous log files containing APM (Application Performance Metrics), Application, and Request logs.

Notifications You must be signed in to change notification settings

gopinathsjsu/individual-project-Lam-Nguyen

Repository files navigation

Review Assignment Due Date

Log Parser Application

Course: CMPE 202 - Software Systems Engineering
Student: Lam Nguyen
SJSU ID: 018229432


Project Overview

A command-line application for parsing and aggregating heterogeneous log files containing APM (Application Performance Metrics), Application, and Request logs.

Project Structure

├── src/main/java/edu/sjsu/cmpe202/logparser/
│   ├── model/           # Domain models (LogEntry, APMLog, etc.)
│   ├── parser/          # Log parsing strategies
│   ├── aggregator/      # Log aggregation logic
│   ├── writer/          # JSON output writers
│   └── util/            # Utility classes
├── src/test/java/       # JUnit tests
├── DESIGN_DOCUMENT_PART1.md   # Part I: Design patterns & class diagram
├── sample_input.txt     # Sample log file
└── pom.xml              # Maven configuration

Building & Running

Prerequisites

  • Java 11+ (required)
  • Maven 3.6+ (optional - only needed to build from source)

Quick Start (Pre-built JAR)

A pre-built JAR is included in the repository. Just run:

java -jar log-parser.jar --file sample_input.txt

Build from Source (Optional)

mvn clean package
java -jar target/log-parser-1.0-SNAPSHOT.jar --file <input-file.txt>

Example

java -jar log-parser.jar --file sample_input.txt

Output Files

  • apm.json - APM log aggregations (min, median, avg, max per metric)
  • application.json - Application log counts by severity level
  • request.json - Request log percentiles and status codes per route

Testing

mvn test

Test Results: 57 tests, 100% pass rate

Design Patterns Used

  1. Strategy Pattern - Interchangeable parsing algorithms
  2. Chain of Responsibility - Route logs to correct parser
  3. Template Method - Common aggregation interface
  4. Factory Pattern - Create log entry objects

See DESIGN_DOCUMENT_PART1.md for detailed design analysis.

Class Diagram

Class Diagram

About

A CLI application for parsing and aggregating heterogeneous log files containing APM (Application Performance Metrics), Application, and Request logs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages