remove relp stuff for now, was not building

This commit is contained in:
2024-06-14 05:34:05 -07:00
parent d8f35dd031
commit 000fe293ee
2 changed files with 9 additions and 285 deletions

View File

@@ -14,8 +14,7 @@ import (
)
var (
relpServerURL = os.Getenv("LOGGER_RELP_URL")
webhookURL = os.Getenv("LOGGER_WEBHOOK_URL")
webhookURL = os.Getenv("LOGGER_WEBHOOK_URL")
)
var ourCustomLogger *slog.Logger
@@ -38,13 +37,6 @@ func NewMultiplexHandler() slog.Handler {
} else {
cl.handlers = append(cl.handlers, NewJSONHandler())
}
if relpServerURL != "" {
handler, err := NewRELPHandler(relpServerURL)
if err != nil {
log.Fatalf("Failed to initialize RELP handler: %v", err)
}
cl.handlers = append(cl.handlers, handler)
}
if webhookURL != "" {
handler, err := NewWebhookHandler(webhookURL)
if err != nil {
@@ -55,7 +47,10 @@ func NewMultiplexHandler() slog.Handler {
return cl
}
func (cl *MultiplexHandler) Handle(ctx context.Context, record slog.Record) error {
func (cl *MultiplexHandler) Handle(
ctx context.Context,
record slog.Record,
) error {
for _, handler := range cl.handlers {
if err := handler.Handle(ctx, record); err != nil {
return err
@@ -64,7 +59,10 @@ func (cl *MultiplexHandler) Handle(ctx context.Context, record slog.Record) erro
return nil
}
func (cl *MultiplexHandler) Enabled(ctx context.Context, level slog.Level) bool {
func (cl *MultiplexHandler) Enabled(
ctx context.Context,
level slog.Level,
) bool {
// send us all events
return true
}