Skip to content

Commit 526da27

Browse files
committed
comment 8
Signed-off-by: Mahmoud Shahrokni <seyedmahmoud.shahrokni@amadeus.com>
1 parent 06f778e commit 526da27

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scripts/manage_plugins/manage_plugins.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ package main
1515

1616
import (
1717
"context"
18-
"fmt"
1918
"os"
2019
"os/exec"
2120
"os/signal"
2221
"sync"
2322
"syscall"
2423
"time"
24+
25+
"github.com/sirupsen/logrus"
2526
)
2627

2728
func main() {
@@ -38,7 +39,7 @@ func main() {
3839
// If any of these signals are received, we will cancel the context which will stop all running plugin processes
3940
go func() {
4041
<-sigChan
41-
fmt.Println("\nTermination signal received. Cleaning up...")
42+
logrus.Infof("\nTermination signal received. Cleaning up...")
4243
cancel()
4344
}()
4445

@@ -55,9 +56,9 @@ func main() {
5556
cmd.Stdout = os.Stdout
5657
cmd.Stderr = os.Stderr
5758

58-
fmt.Printf("Starting plugin: %s\n", p)
59+
logrus.Infof("Starting plugin: %s\n", p)
5960
if err := cmd.Start(); err != nil {
60-
fmt.Errorf("failed to start %s: %v\n", p, err)
61+
logrus.Errorf("failed to start %s: %v\n", p, err)
6162
return
6263
}
6364

@@ -70,11 +71,11 @@ func main() {
7071
testCmd.Stdout = os.Stdout
7172
testCmd.Stderr = os.Stderr
7273
if err := testCmd.Run(); err != nil {
73-
fmt.Errorf("tests failed for plugin %s: %v\n", p, err)
74+
logrus.Errorf("tests failed for plugin %s: %v\n", p, err)
7475
}
7576
}(plugin)
7677
}
7778

7879
wg.Wait()
79-
fmt.Println("All plugin tests completed.")
80+
logrus.Infof("All plugin tests completed.")
8081
}

0 commit comments

Comments
 (0)