1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-04 04:08:02 +02:00

Continued logging work

This commit is contained in:
binwiederhier 2023-02-05 23:34:27 -05:00
parent 27bd79febf
commit 7cc8c81bd8
28 changed files with 287 additions and 171 deletions

View file

@ -91,19 +91,14 @@ func ToFormat(s string) Format {
}
}
// Contexter allows structs to export a key-value pairs in the form of a Context
type Contexter interface {
Context() map[string]any
// Context returns the object context as key-value pairs
Context() Context
}
type fieldsCtx map[string]any
func (f fieldsCtx) Context() map[string]any {
return f
}
func NewCtx(fields map[string]any) Contexter {
return fieldsCtx(fields)
}
// Context represents an object's state in the form of key-value pairs
type Context map[string]any
type levelOverride struct {
value any