logger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoggerChan chan *LogEvent = make(chan *LogEvent, 5000)
View Source
var NoLogRegex map[string]*regexp.Regexp = map[string]*regexp.Regexp{
	"CREDIT CARD": regexp.MustCompile(`(?mi)(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})`),
	"AMEX CARD":   regexp.MustCompile(`(?mi)3[47][0-9]{13}`),

	"SSN": regexp.MustCompile(`(?mi)\d{3}[- ]?\d{2}[- ]?\d{4}`),
}

Functions

func RemoveNonLogData

func RemoveNonLogData(data string) string

func StartLogging

func StartLogging(db *bolt.DB)

----------------------------------------------------------------------------------

----------------------------------------------------------------------------------

Types

type LogEvent

type LogEvent struct {
	EventTime  time.Time
	Id         string
	Type       string
	Message    string
	ScrubeData bool
}

----------------------------------------------------------------------------------

----------------------------------------------------------------------------------

func GetLogEvent

func GetLogEvent(logType string, id string, message string, scrubeData bool) *LogEvent

----------------------------------------------------------------------------------

----------------------------------------------------------------------------------

func (*LogEvent) String

func (l *LogEvent) String() string

Jump to

Keyboard shortcuts

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