logconsole

package
v0.0.0-...-7eb2361 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendLogMessage

func SendLogMessage(ch chan LogMessage, logID idwrap.IDWrap, name string, level LogLevel, payload map[string]any)

Types

type LogChanMap

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

func NewLogChanMap

func NewLogChanMap() LogChanMap

func NewLogChanMapWith

func NewLogChanMapWith(size int) LogChanMap

func (*LogChanMap) AddLogChannel

func (l *LogChanMap) AddLogChannel(userID idwrap.IDWrap) chan LogMessage

func (*LogChanMap) DeleteLogChannel

func (l *LogChanMap) DeleteLogChannel(userID idwrap.IDWrap)

func (*LogChanMap) SendMsgToUserWithContext

func (logChannels *LogChanMap) SendMsgToUserWithContext(ctx context.Context, logID idwrap.IDWrap, name string, level LogLevel, payload map[string]any) error

type LogLevel

type LogLevel int32

LogLevel represents the severity level of a log message

const (
	LogLevelUnspecified LogLevel = 0
	LogLevelWarning     LogLevel = 1
	LogLevelError       LogLevel = 2
)

type LogMessage

type LogMessage struct {
	LogID idwrap.IDWrap
	Name  string
	Level LogLevel
	// JSON contains the structured payload encoded as JSON.
	JSON string
}

Jump to

Keyboard shortcuts

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