logger

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package logger will take care of all logging messages using logrus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug Log

func Debugf

func Debugf(format string, args ...interface{})

Debugf Log

func Error

func Error(args ...interface{})

Error Log

func Errorf

func Errorf(format string, args ...interface{})

Errorf Log

func Fatal

func Fatal(args ...interface{})

Fatal Log

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf Log

func HandleWebhookSend added in v1.0.8

func HandleWebhookSend(message string, event string, wh webhook.Webhook)

func Info

func Info(args ...interface{})

Info Log

func Infof

func Infof(format string, args ...interface{})

Infof Log

func LogFile added in v1.0.1

func LogFile(multiwriter io.Writer)

func LogRequest

func LogRequest(req *http.Request, status int, verbose bool, wh webhook.Webhook)

LogRequest will log the request in a uniform way

func LogSFTPRequest added in v1.0.7

func LogSFTPRequest(r *sftp.Request, ip string)

func LogSFTPRequestBlocked added in v1.0.7

func LogSFTPRequestBlocked(r *sftp.Request, ip string, err error)

func MissingEnv

func MissingEnv(envName string)

MissingEnv is a standard error message

func Panic

func Panic(args ...interface{})

Panic Log

func Panicf

func Panicf(format string, args ...interface{})

Panicf Log

func Warn

func Warn(args ...interface{})

Warn Log

func Warnf

func Warnf(format string, args ...interface{})

Warnf Log

Types

type CustomFormatter added in v1.0.8

type CustomFormatter struct {
	logrus.TextFormatter
}

func (*CustomFormatter) Format added in v1.0.8

func (f *CustomFormatter) Format(entry *logrus.Entry) ([]byte, error)

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event stores messages to log later, from our standard interface.

type StandardLogger

type StandardLogger struct {
	*logrus.Logger
}

StandardLogger enforces specific log message formats.

func NewLogger

func NewLogger() *StandardLogger

NewLogger initializes the standard logger.

func (*StandardLogger) Verbose added in v1.0.8

func (l *StandardLogger) Verbose(args ...interface{})

Verbose Log

func (*StandardLogger) Verbosef added in v1.0.8

func (l *StandardLogger) Verbosef(format string, args ...interface{})

Verbosef Log

Jump to

Keyboard shortcuts

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