0

[WIP] Replace logrus with slog

This commit is contained in:
eleksir
2025-10-31 18:49:25 +03:00
parent c149b92c0c
commit d8a92b37fc
7 changed files with 206 additions and 42 deletions

View File

@@ -4,7 +4,7 @@ import (
"os"
"syscall"
log "github.com/sirupsen/logrus"
"aleesa-telegram-go/internal/log"
)
// sigHandler хэндлер сигналов закрывает все бд, все сетевые соединения и сваливает из приложения.
@@ -15,11 +15,11 @@ func sigHandler() {
var s = <-sigChan
switch s {
case syscall.SIGINT:
log.Infoln("Got SIGINT, quitting")
log.Info("Got SIGINT, quitting")
case syscall.SIGTERM:
log.Infoln("Got SIGTERM, quitting")
log.Info("Got SIGTERM, quitting")
case syscall.SIGQUIT:
log.Infoln("Got SIGQUIT, quitting")
log.Info("Got SIGQUIT, quitting")
// Заходим на новую итерацию, если у нас "неинтересный" сигнал.
default: