Skip to content

Commit 7cc6bed

Browse files
changes to create debug log in .privado folder (#61)
changes to create debug log in .privado folder
1 parent 830c2e0 commit 7cc6bed

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ privado-cli
1515
.vscode
1616

1717
LICENSE_SOURCE_PRETEXT.md
18+
19+
.idea

pkg/docker/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ package docker
2424

2525
import (
2626
"fmt"
27+
"path/filepath"
2728

2829
"github.com/Privado-Inc/privado-cli/pkg/config"
2930
"github.com/Privado-Inc/privado-cli/pkg/telemetry"
@@ -167,7 +168,6 @@ func OptionWithDisabledDeduplication(disableDeduplication bool) RunImageOption {
167168
}
168169
}
169170

170-
171171
func OptionWithEnvironmentVariables(envVars []EnvVar) RunImageOption {
172172
return func(rh *runImageHandler) {
173173
if len(envVars) > 0 {
@@ -218,7 +218,7 @@ func OptionWithDebug(isDebug bool) RunImageOption {
218218
// currently only enable output in debug mode
219219
if isDebug {
220220
rh.attachOutput = true
221-
rh.args = append(rh.args, fmt.Sprintf("-Dlog4j2.configurationFile=%s", config.AppConfig.Container.LogConfigVolumeDir))
221+
rh.args = append(rh.args, fmt.Sprintf("-Dlog4j2.configurationFile=%s", config.AppConfig.Container.LogConfigVolumeDir), fmt.Sprintf("-DlogFilePath=%s", filepath.Join(config.AppConfig.Container.SourceCodeVolumeDir, ".privado", "debug.log")))
222222
}
223223
}
224224
}

0 commit comments

Comments
 (0)