Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cluster ¶
Cluster processes a log by applying sanitization and normalization.
Parameters:
- log: original log content in bytes.
- idLog: unique identifier for the log.
Returns:
- []byte: the resulting log after sanitizing and normalization.
The function performs:
- Calls sanitizer.Sanitizer with log and idLog to clean the text.
- Then calls NormalizeLog on the result to unity the format.
func NormalizeLog ¶
NormalizeLog normalizes a log by replacing specific patterns and trimming spaces.
Parameters:
- log: []byte containing the log content to be normalized.
Returns:
- []byte: the modified log, with patterns replaced by '*' and leading/trailing spaces removed
The function performs:
- Applies a regular expression (sanitizer.Re) to replace all matches with '*'.
- Then removes leading and trailing whitespace using bytes.TrimSpace.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.