proper logs are added
This commit is contained in:
parent
6a8e41ae63
commit
18435e0f02
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue