Documentation ¶
Index ¶
Constants ¶
View Source
const SystemAttribute = "serviceakasar/system"
Variables ¶
This section is empty.
Functions ¶
func ShortenComponent ¶
func StderrLogger ¶
Types ¶
type LogHandler ¶
type LogHandler struct { Write func(entry *protos.LogEntry) // contains filtered or unexported fields }
func NewLogHandler ¶
func NewLogHandler(w func(entry *protos.LogEntry), opts Options) *LogHandler
NewLogHandler w after w.Write(b), b will be put back to a sync.Pool, so do not continue hold a reference to b.
type LogHandler2 ¶
type LogHandler2 struct { *slog.JSONHandler // contains filtered or unexported fields }
type PrettyFormatter ¶
type PrettyPrinter ¶
type PrettyPrinter struct {
// contains filtered or unexported fields
}
PrettyPrinter pretty prints log entries to json string.
func NewPrettyPrinter ¶
func NewPrettyPrinter() *PrettyPrinter
Click to show internal directories.
Click to hide internal directories.