fix logs and add cancellation

This commit is contained in:
Kujtim Hoxha 2025-04-10 13:29:44 +02:00
parent 0b007b9c77
commit 36f201d5d3
23 changed files with 343 additions and 283 deletions

View file

@ -1,23 +0,0 @@
package logging
import (
"context"
"github.com/kujtimiihoxha/termai/internal/pubsub"
)
type Interface interface {
Debug(msg string, args ...any)
Info(msg string, args ...any)
Warn(msg string, args ...any)
Error(msg string, args ...any)
Subscribe(ctx context.Context) <-chan pubsub.Event[LogMessage]
PersistDebug(msg string, args ...any)
PersistInfo(msg string, args ...any)
PersistWarn(msg string, args ...any)
PersistError(msg string, args ...any)
List() []LogMessage
SetLevel(level string)
}