Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 2.09 KB

File metadata and controls

69 lines (47 loc) · 2.09 KB

📖 LogPulse Tutorial: Understanding Your Logs

This guide explains how to interpret the results when running LogPulse, using the included test_logs.log as an example.

1. Running the Tool

To analyze the sample logs on Windows:

# Make sure your virtual environment is active
venv\Scripts\activate

# Run LogPulse
python main.py test_logs.log

2. Reading the Output

The LogPulse interface is split into two panels:

Left Panel: The Live Stream 🌊

This shows the Raw Logs exactly as they appear in the file. Example:

2023-10-28 14:00:02 ERROR [PaymentGateway] Transaction 0xA1B2 failed: Timeout receiving response from bank
2023-10-28 14:00:06 ERROR [PaymentGateway] Transaction 0xC3D4 failed: Timeout receiving response from bank

Right Panel: Top Clusters 📊

This is where the magic happens. LogPulse groups similar logs together.

Count Template Pattern
5 <*>:<*>:<*> ERROR [PaymentGateway] Transaction <*> failed...

3. Case Study: The "Payment Gateway" Error

In the test_logs.log file, we have randomized transaction IDs:

  • 0xA1B2
  • 0xC3D4
  • 0xE5F6

Problem

A standard grep or search tool would see these as 3 different errors. You might miss the fact that your Payment Gateway is consistently failing because the errors look "unique".

Solution (The "Cluster")

LogPulse identifies that 0xA1B2 looks like a Hexadecimal ID (Variable). It replaces it with <*>.

The Result: Instead of seeing 3 unique lines, you see 1 Cluster with a count of 3.

Insight: "My Payment Gateway failed 3 times today." (Actionable!) vs "I have 3 random errors." (Noise)


4. Other Examples

Cluster Pattern Meaning
INFO [AuthService] User <*> logged in... Tracks user login volume. The <*> masks the User ID and IP.
WARN [DiskMonitor] Disk usage... is at <*> Tracks disk warnings. The <*> masks the percentage.

Summary

  • Count: How many times this pattern occurred.
  • <*>: A variable part of the log (ID, Number, IP) that was masked to find the pattern.