Skip to content

Commit 59990d8

Browse files
fix logger
1 parent 7559b66 commit 59990d8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

cli/cli.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,20 @@ func isChild() bool {
100100

101101
// Run executes the boundary command with the given configuration and arguments
102102
func Run(ctx context.Context, config Config, args []string) error {
103+
logger, err := setupLogging(config)
104+
if err != nil {
105+
return fmt.Errorf("could not set up logging: %v", err)
106+
}
107+
103108
if isChild() {
104-
// TODO: use logger
105-
//log.Printf("boundary CHILD process is started")
109+
logger.Info("boundary CHILD process is started")
106110

107111
vethNetJail := os.Getenv("VETH_JAIL_NAME")
108112
err := jail.SetupChildNetworking(vethNetJail)
109113
if err != nil {
110114
return fmt.Errorf("failed to setup child networking: %v", err)
111115
}
112-
// TODO: use logger
113-
//log.Printf("child networking is successfully configured")
116+
logger.Info("child networking is successfully configured")
114117

115118
// Program to run
116119
bin := args[0]
@@ -132,10 +135,6 @@ func Run(ctx context.Context, config Config, args []string) error {
132135
ctx, cancel := context.WithCancel(ctx)
133136
defer cancel()
134137

135-
logger, err := setupLogging(config)
136-
if err != nil {
137-
return fmt.Errorf("could not set up logging: %v", err)
138-
}
139138
username, uid, gid, homeDir, configDir := util.GetUserInfo()
140139

141140
// Get command arguments

0 commit comments

Comments
 (0)