Skip to content

Commit

Permalink
Add LOG_LOCATION environment config variable (same as db_log_location)
Browse files Browse the repository at this point in the history
Note: We don't support the equivalent of the experimental setting
db_log_docker_tail since it would require the "docker" binary inside
the pganalyze container (as well as full Docker access), instead the
approach for using pganalyze as a sidecar container alongside Postgres
currently requires writing to a file and then mounting that as a
volume inside the pganalyze container, for now.
  • Loading branch information
lfittl committed Nov 30, 2018
1 parent 2e6f151 commit 515202d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ func getDefaultConfig() *ServerConfig {
if awsSecretAccessKey := os.Getenv("AWS_SECRET_ACCESS_KEY"); awsSecretAccessKey != "" {
config.AwsSecretAccessKey = awsSecretAccessKey
}
if logLocation := os.Getenv("LOG_LOCATION"); logLocation != "" {
config.LogLocation = logLocation
config.EnableLogs = true
}
// Note: We don't support LogDockerTail here since it would require the "docker"
// binary inside the pganalyze container (as well as full Docker access), instead
// the approach for using pganalyze as a sidecar container alongside Postgres
// currently requires writing to a file and then mounting that as a volume
// inside the pganalyze container.
if ignoreTablePattern := os.Getenv("IGNORE_TABLE_PATTERN"); ignoreTablePattern != "" {
config.IgnoreTablePattern = ignoreTablePattern
}
Expand Down

0 comments on commit 515202d

Please sign in to comment.