Documentation
¶
Index ¶
- func WithLogger(ctx context.Context, logger *Logger) context.Context
- type LogLevel
- type Logger
- func (l *Logger) FinishOperation(ctx context.Context, span trace.Span, operation string, start time.Time, ...)
- func (l *Logger) LogDatabaseOperation(ctx context.Context, operation string, table string, rowsAffected int64, ...)
- func (l *Logger) LogDiscoveryEvent(ctx context.Context, assetType string, assetValue string, confidence float64, ...)
- func (l *Logger) LogDuration(ctx context.Context, operation string, start time.Time, fields ...interface{})
- func (l *Logger) LogError(ctx context.Context, err error, operation string, fields ...interface{})
- func (l *Logger) LogHTTPRequest(ctx context.Context, method, url string, statusCode int, ...)
- func (l *Logger) LogPanic(ctx context.Context, recovered interface{}, operation string, ...)
- func (l *Logger) LogScanProgress(ctx context.Context, scanID string, progress float64, status string, ...)
- func (l *Logger) LogSecurityEvent(ctx context.Context, eventType string, severity string, ...)
- func (l *Logger) LogSlowOperation(ctx context.Context, operation string, duration time.Duration, ...)
- func (l *Logger) LogVulnerability(ctx context.Context, vuln map[string]interface{})
- func (l *Logger) SetLevel(level string) error
- func (l *Logger) StartOperation(ctx context.Context, operation string, fields ...interface{}) (context.Context, trace.Span)
- func (l *Logger) StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
- func (l *Logger) StartSpanWithAttributes(ctx context.Context, name string, attrs []attribute.KeyValue, ...) (context.Context, trace.Span)
- func (l *Logger) WithComponent(component string) *Logger
- func (l *Logger) WithContext(ctx context.Context) *Logger
- func (l *Logger) WithFields(fields ...interface{}) *Logger
- func (l *Logger) WithModule(module string) *Logger
- func (l *Logger) WithScanID(scanID string) *Logger
- func (l *Logger) WithTarget(target string) *Logger
- func (l *Logger) WithTool(tool string) *Logger
- func (l *Logger) WithTracer(tracer trace.Tracer) *Logger
- func (l *Logger) Zap() *zap.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct { *zap.SugaredLogger // contains filtered or unexported fields }
func FromContext ¶
func (*Logger) FinishOperation ¶
func (*Logger) LogDatabaseOperation ¶
func (*Logger) LogDiscoveryEvent ¶
func (*Logger) LogDuration ¶
func (*Logger) LogHTTPRequest ¶
func (*Logger) LogScanProgress ¶
func (*Logger) LogSecurityEvent ¶
func (*Logger) LogSlowOperation ¶
func (*Logger) LogVulnerability ¶
func (*Logger) StartOperation ¶
func (*Logger) StartSpanWithAttributes ¶
func (*Logger) WithComponent ¶
func (*Logger) WithFields ¶
func (*Logger) WithModule ¶
func (*Logger) WithScanID ¶
func (*Logger) WithTarget ¶
Click to show internal directories.
Click to hide internal directories.