proper logs are added

This commit is contained in:
kemvl 2024-03-29 12:47:20 +05:00
parent 6a8e41ae63
commit 18435e0f02
1 changed files with 2 additions and 0 deletions

View File

@ -39,9 +39,11 @@ func NewSMPPClient(cfg *config.Config) (*SMPPClient, error) {
status := <-connStatus
if status.Status() == smpp.Connected {
logger.InfoLogger.Info("Connected to SMPP server.")
slog.Info("Connected to SMPP server.")
break
} else {
logger.ErrorLogger.Error("Failed to connect:", status.Error())
slog.Error("Failed to establish OTP connection:", status.Error())
logger.InfoLogger.Info("Retrying in 5 seconds...")
time.Sleep(5 * time.Second) // Wait for 5 seconds before retrying
}