Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit 6c2a075

Browse files
committed
clean up the logging further. Add [INFO]/[DEBUG]
1 parent d206222 commit 6c2a075

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

compose/internal/composebinary/composebinary.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ func (wrapper *ComposeWrapper) Deploy(ctx context.Context, workingDir, host, pro
4040
return err
4141
}
4242

43-
log.Printf("[libstack,composebinary] [message: deploy complete] [output: %s] [success]", output)
43+
log.Printf("[INFO] [libstack,composebinary] [message: Stack deployment successful]")
44+
log.Printf("[DEBUG] [libstack,composebinary] [output: %s]", output)
4445
}
4546

4647
return err
@@ -51,11 +52,11 @@ func (wrapper *ComposeWrapper) Remove(ctx context.Context, workingDir, host, pro
5152
output, err := wrapper.Command(newDownCommand(filePaths), workingDir, host, projectName, "")
5253
if len(output) != 0 {
5354
if err != nil {
54-
log.Printf("[libstack,composebinary] [message: remove complete] [output: %s] [err: %s]", output, err)
5555
return err
5656
}
5757

58-
log.Printf("[libstack,composebinary] [message: remove complete] [output: %s] [success]", output)
58+
log.Printf("[INFO] [libstack,composebinary] [message: Stack removal successful]")
59+
log.Printf("[DEBUG] [libstack,composebinary] [output: %s]", output)
5960
}
6061

6162
return err
@@ -67,11 +68,11 @@ func (wrapper *ComposeWrapper) Pull(ctx context.Context, workingDir, host, proje
6768
output, err := wrapper.Command(newPullCommand(filePaths), workingDir, host, projectName, "")
6869
if len(output) != 0 {
6970
if err != nil {
70-
log.Printf("[libstack,composebinary] [message: pull complete] [output: %s] [err: %s]", output, err)
7171
return err
7272
}
7373

74-
log.Printf("[libstack,composebinary] [message: pull complete] [output: %s] [success]", output)
74+
log.Printf("[INFO] [libstack,composebinary] [message: Stack pull successful]")
75+
log.Printf("[DEBUG] [libstack,composebinary] [output: %s]", output)
7576
}
7677

7778
return err

compose/internal/composeplugin/composeplugin.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ func (wrapper *PluginWrapper) Deploy(ctx context.Context, workingDir, host, proj
6666
output, err := wrapper.command(newUpCommand(filePaths, forceRereate), workingDir, host, projectName, envFilePath)
6767
if len(output) != 0 {
6868
if err != nil {
69-
log.Printf("[libstack,composebinary] [message: deploy complete] [output: %s] [err: %s]", output, err)
7069
return err
7170
}
7271

73-
log.Printf("[libstack,composebinary] [message: deploy complete] [output: %s] [success]", output)
72+
log.Printf("[INFO] [libstack,composeplugin] [message: Stack deployment successful]")
73+
log.Printf("[DEBUG] [libstack,composeplugin] [output: %s]", output)
7474
}
7575

7676
return err
@@ -81,11 +81,11 @@ func (wrapper *PluginWrapper) Remove(ctx context.Context, workingDir, host, proj
8181
output, err := wrapper.command(newDownCommand(filePaths), workingDir, host, projectName, "")
8282
if len(output) != 0 {
8383
if err != nil {
84-
log.Printf("[libstack,composebinary] [message: remove complete] [output: %s] [err: %s]", output, err)
8584
return err
8685
}
8786

88-
log.Printf("[libstack,composebinary] [message: remove complete] [output: %s] [success]", output)
87+
log.Printf("[INFO] [libstack,composeplugin] [message: Stack removal successful]")
88+
log.Printf("[DEBUG] [libstack,composeplugin] [output: %s]", output)
8989
}
9090

9191
return err
@@ -96,11 +96,11 @@ func (wrapper *PluginWrapper) Pull(ctx context.Context, workingDir, host, projec
9696
output, err := wrapper.command(newPullCommand(filePaths), workingDir, host, projectName, "")
9797
if len(output) != 0 {
9898
if err != nil {
99-
log.Printf("[libstack,composebinary] [message: pull complete] [output: %s] [err: %s]", output, err)
10099
return err
101100
}
102101

103-
log.Printf("[libstack,composebinary] [message: pull complete] [output: %s] [success]", output)
102+
log.Printf("[INFO] [libstack,composeplugin] [message: Stack pull successful]")
103+
log.Printf("[DEBUG] [libstack,composeplugin] [output: %s]", output)
104104
}
105105

106106
return err

0 commit comments

Comments
 (0)