LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::utils::EventGroupManager Class Reference

Event grouping and clustering system for v1.10.0 Phase 10. More...

#include <EventGroupManager.hpp>

Collaboration diagram for ui::qt::utils::EventGroupManager:
Collaboration graph

Classes

struct  EventGroup
 

Public Types

enum class  GroupStrategy {
  ByLevel , ByMessage , ByPattern , ByActor ,
  ByTimeBucket
}
 

Public Member Functions

std::vector< EventGroup > generateGroups (const std::vector< db::LogEvent * > &events, GroupStrategy strategy)
 Generate event groups using specified strategy.
 
double calculateSimilarity (const QString &msg1, const QString &msg2) const
 Get similarity score between two messages (0.0 to 1.0)
 
void setSimilarityThreshold (double threshold)
 Set similarity threshold for pattern matching (0.0 to 1.0)
 
double similarityThreshold () const
 
std::vector< int > flattenGroups (const std::vector< EventGroup > &groups) const
 Flatten groups back to individual events.
 

Static Public Member Functions

static EventGroupManager & getInstance ()
 
static std::vector< QString > getAvailableStrategies ()
 Get available grouping strategies.
 

Private Member Functions

 EventGroupManager ()
 
std::vector< EventGroup > GroupByLevel (const std::vector< db::LogEvent * > &events)
 
std::vector< EventGroup > GroupByMessage (const std::vector< db::LogEvent * > &events)
 
std::vector< EventGroup > GroupByPattern (const std::vector< db::LogEvent * > &events)
 
std::vector< EventGroup > GroupByActor (const std::vector< db::LogEvent * > &events)
 
std::vector< EventGroup > GroupByTimeBucket (const std::vector< db::LogEvent * > &events)
 
QString ExtractPattern (const QString &message) const
 
QString NormalizeMessage (const QString &message) const
 

Private Attributes

double m_similarityThreshold {0.8}
 
int m_timeBucketMinutes {5}
 

Detailed Description

Event grouping and clustering system for v1.10.0 Phase 10.

Features:

  • Automatic clustering of similar log events
  • Multiple grouping strategies (by level, by message pattern, by actor)
  • Configurable similarity threshold
  • Group statistics (count, first/last timestamp, severity)
  • Pattern-based deduplication
  • Expandable groups in UI

Member Enumeration Documentation

◆ GroupStrategy

Enumerator
ByLevel 
ByMessage 
ByPattern 
ByActor 
ByTimeBucket 

Constructor & Destructor Documentation

◆ EventGroupManager()

ui::qt::utils::EventGroupManager::EventGroupManager ( )
private

Member Function Documentation

◆ calculateSimilarity()

double ui::qt::utils::EventGroupManager::calculateSimilarity ( const QString &  msg1,
const QString &  msg2 
) const

Get similarity score between two messages (0.0 to 1.0)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExtractPattern()

QString ui::qt::utils::EventGroupManager::ExtractPattern ( const QString &  message) const
private
Here is the caller graph for this function:

◆ flattenGroups()

std::vector< int > ui::qt::utils::EventGroupManager::flattenGroups ( const std::vector< EventGroup > &  groups) const

Flatten groups back to individual events.

◆ generateGroups()

std::vector< EventGroupManager::EventGroup > ui::qt::utils::EventGroupManager::generateGroups ( const std::vector< db::LogEvent * > &  events,
GroupStrategy  strategy 
)

Generate event groups using specified strategy.

Here is the call graph for this function:

◆ getAvailableStrategies()

std::vector< QString > ui::qt::utils::EventGroupManager::getAvailableStrategies ( )
static

Get available grouping strategies.

◆ getInstance()

EventGroupManager & ui::qt::utils::EventGroupManager::getInstance ( )
static

◆ GroupByActor()

std::vector< EventGroupManager::EventGroup > ui::qt::utils::EventGroupManager::GroupByActor ( const std::vector< db::LogEvent * > &  events)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GroupByLevel()

std::vector< EventGroupManager::EventGroup > ui::qt::utils::EventGroupManager::GroupByLevel ( const std::vector< db::LogEvent * > &  events)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GroupByMessage()

std::vector< EventGroupManager::EventGroup > ui::qt::utils::EventGroupManager::GroupByMessage ( const std::vector< db::LogEvent * > &  events)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GroupByPattern()

std::vector< EventGroupManager::EventGroup > ui::qt::utils::EventGroupManager::GroupByPattern ( const std::vector< db::LogEvent * > &  events)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GroupByTimeBucket()

std::vector< EventGroupManager::EventGroup > ui::qt::utils::EventGroupManager::GroupByTimeBucket ( const std::vector< db::LogEvent * > &  events)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NormalizeMessage()

QString ui::qt::utils::EventGroupManager::NormalizeMessage ( const QString &  message) const
private
Here is the caller graph for this function:

◆ setSimilarityThreshold()

void ui::qt::utils::EventGroupManager::setSimilarityThreshold ( double  threshold)

Set similarity threshold for pattern matching (0.0 to 1.0)

Here is the call graph for this function:

◆ similarityThreshold()

double ui::qt::utils::EventGroupManager::similarityThreshold ( ) const
inline

Member Data Documentation

◆ m_similarityThreshold

double ui::qt::utils::EventGroupManager::m_similarityThreshold {0.8}
private

◆ m_timeBucketMinutes

int ui::qt::utils::EventGroupManager::m_timeBucketMinutes {5}
private

The documentation for this class was generated from the following files: