Skip to content

Commit

Permalink
Merge pull request #62 from Privado-Inc/dev
Browse files Browse the repository at this point in the history
changes to create debug log in .privado folder (#61)
  • Loading branch information
pandurangpatil authored Jan 22, 2024
2 parents ad968e2 + 7cc6bed commit 7a6e8ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ privado-cli
.vscode

LICENSE_SOURCE_PRETEXT.md

.idea
4 changes: 2 additions & 2 deletions pkg/docker/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package docker

import (
"fmt"
"path/filepath"

"github.com/Privado-Inc/privado-cli/pkg/config"
"github.com/Privado-Inc/privado-cli/pkg/telemetry"
Expand Down Expand Up @@ -167,7 +168,6 @@ func OptionWithDisabledDeduplication(disableDeduplication bool) RunImageOption {
}
}


func OptionWithEnvironmentVariables(envVars []EnvVar) RunImageOption {
return func(rh *runImageHandler) {
if len(envVars) > 0 {
Expand Down Expand Up @@ -218,7 +218,7 @@ func OptionWithDebug(isDebug bool) RunImageOption {
// currently only enable output in debug mode
if isDebug {
rh.attachOutput = true
rh.args = append(rh.args, fmt.Sprintf("-Dlog4j2.configurationFile=%s", config.AppConfig.Container.LogConfigVolumeDir))
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")))
}
}
}
Expand Down

0 comments on commit 7a6e8ff

Please sign in to comment.