logging

package
v0.0.0-...-9f24b57 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Logging Levels
	DebugLowLevel structs.LogLevel = iota
	DebugLevel
	InfoLevel
	WarningLevel
	ErrorLevel
	CriticalLevel
	AuditLevel
)

Variables

View Source
var (
	// LevelChannelMap maps a logging level to a channel
	LevelChannelMap map[structs.LogLevel]*string = make(map[structs.LogLevel]*string)

	// LevelNameMap maps a logging level to a name
	LevelNameMap map[structs.LogLevel]string = make(map[structs.LogLevel]string)

	// NameLevelMap maps a name to a logging level
	NameLevelMap map[string]structs.LogLevel = make(map[string]structs.LogLevel)
)
View Source
var (
	// Out is the file to write logs to
	Out *os.File
)

Functions

func Audit

func Audit(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

Audit logs an audit message

func AuditButton

func AuditButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

AuditButtons logs a message with buttons at the AuditLevel

func AuditButtons

func AuditButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

AuditButtons logs a message with buttons at the AuditLevel

func AuditDD

func AuditDD(content string, span ddtrace.Span, fields ...logrus.Fields)

AuditDD logs an audit message to datadog

func Critical

func Critical(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

Critical logs a critical message

func CriticalButton

func CriticalButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

CriticalButtons logs a message with buttons at the CriticalLevel

func CriticalButtons

func CriticalButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

CriticalButtons logs a message with buttons at the CriticalLevel

func CriticalDD

func CriticalDD(content string, span ddtrace.Span, fields ...logrus.Fields)

CriticalDD logs a critical message to datadog

func Debug

func Debug(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

Debug logs a debug message

func DebugButton

func DebugButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

DebugButtons logs a message with buttons at the DebugLevel

func DebugButtons

func DebugButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

DebugButtons logs a message with buttons at the DebugLevel

func DebugDD

func DebugDD(content string, span ddtrace.Span, fields ...logrus.Fields)

DebugDD logs a debug message to datadog

func DebugLow

func DebugLow(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

DebugLow logs a debug message

func DebugLowButton

func DebugLowButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

DebugLowButtons logs a message with buttons at the DebugLowLevel

func DebugLowButtons

func DebugLowButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

DebugLowButtons logs a message with buttons at the DebugLowLevel

func Error

func Error(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

Error logs an error message

func ErrorButton

func ErrorButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

ErrorButtons logs a message with buttons at the ErrorLevel

func ErrorButtons

func ErrorButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

ErrorButtons logs a message with buttons at the ErrorLevel

func ErrorDD

func ErrorDD(content string, span ddtrace.Span, fields ...logrus.Fields)

ErrorDD logs an error message to datadog

func Info

func Info(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

Info logs an info message

func InfoButton

func InfoButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

InfoButtons logs a message with buttons at the InfoLevel

func InfoButtons

func InfoButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

InfoButtons logs a message with buttons at the InfoLevel

func InfoDD

func InfoDD(content string, span ddtrace.Span, fields ...logrus.Fields)

InfoDD logs an info message to datadog

func LogLevel

func LogLevel() structs.LogLevel

LogLevel returns the logging level

func Warning

func Warning(s *discordgo.Session, content string, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

Warning logs a warning message

func WarningButton

func WarningButton(s *discordgo.Session, content string, button discordgo.Button, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

WarningButtons logs a message with buttons at the WarningLevel

func WarningButtons

func WarningButtons(s *discordgo.Session, content string, buttons []discordgo.MessageComponent, user *discordgo.User, span ddtrace.Span, fields ...logrus.Fields) *discordgo.Message

WarningButtons logs a message with buttons at the WarningLevel

func WarningDD

func WarningDD(content string, span ddtrace.Span, fields ...logrus.Fields)

WarningDD logs a warning message to datadog

Types

This section is empty.

Jump to

Keyboard shortcuts

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