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
|
status := <-connStatus
|
||||||
if status.Status() == smpp.Connected {
|
if status.Status() == smpp.Connected {
|
||||||
logger.InfoLogger.Info("Connected to SMPP server.")
|
logger.InfoLogger.Info("Connected to SMPP server.")
|
||||||
|
slog.Info("Connected to SMPP server.")
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
logger.ErrorLogger.Error("Failed to connect:", status.Error())
|
logger.ErrorLogger.Error("Failed to connect:", status.Error())
|
||||||
|
slog.Error("Failed to establish OTP connection:", status.Error())
|
||||||
logger.InfoLogger.Info("Retrying in 5 seconds...")
|
logger.InfoLogger.Info("Retrying in 5 seconds...")
|
||||||
time.Sleep(5 * time.Second) // Wait for 5 seconds before retrying
|
time.Sleep(5 * time.Second) // Wait for 5 seconds before retrying
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue