chore: replace logrus with standard lib log/slog

This commit is contained in:
Christoph Haas
2025-03-02 08:51:13 +01:00
parent 5c51573874
commit 7473132932
30 changed files with 479 additions and 247 deletions

View File

@@ -3,10 +3,10 @@ package internal
import (
"crypto/tls"
"fmt"
"log/slog"
"os"
"github.com/go-ldap/ldap/v3"
"github.com/sirupsen/logrus"
"github.com/h44z/wg-portal/internal/config"
)
@@ -75,7 +75,7 @@ func LdapConnect(cfg *config.LdapProvider) (*ldap.Conn, error) {
func LdapDisconnect(conn *ldap.Conn) {
if conn != nil {
if err := conn.Close(); err != nil {
logrus.Errorf("failed to close ldap connection: %v", err)
slog.Error("failed to close ldap connection", "error", err)
}
}
}