cluster

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cluster

func Cluster(log []byte, idLog string) []byte

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

func NormalizeLog(log []byte) []byte

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL