Skip to content

Commit

Permalink
Drop supported log_line_prefix check in test (pganalyze#593)
Browse files Browse the repository at this point in the history
* Avoid log_line_prefix check in log test in new mode
* Drop obsolete TODO
  • Loading branch information
msakrejda authored Sep 4, 2024
1 parent 6f67cf4 commit 1f14a55
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ type ServerConfig struct {
// Configure the collector's log parsing mechanism. Can be either 'legacy' (to
// use the old mechanism), or 'auto' (a new mechanism that can support an
// arbitrary log_line_prefix).
// TODO: analyze and mention (hopefully beneficial) performance impact
LogLinePrefix string `init:"db_log_line_prefix"`

// Specifies a table pattern to ignore - no statistics will be collected for
Expand Down
2 changes: 1 addition & 1 deletion runner/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func TestLogsForAllServers(ctx context.Context, servers []*state.Server, globalC
} else if server.Config.SystemType == "heroku" && logLinePrefix == logs.LogPrefixHerokuHobbyTier {
prefixedLogger.PrintWarning("WARNING - Detected log_line_prefix indicates Heroku Postgres Hobby tier, which has no log output support")
continue
} else if !logs.IsSupportedPrefix(logLinePrefix) {
} else if server.Config.LogLinePrefix == "legacy" && !logs.IsSupportedPrefix(logLinePrefix) {
prefixedLogger.PrintError("ERROR - Unsupported log_line_prefix setting: '%s'", logLinePrefix)
prefixedLogger.PrintInfo("HINT - You can find a list of supported settings in the pganalyze documentation: https://pganalyze.com/docs/log-insights/setup/self-managed/troubleshooting")
hasFailedServers = true
Expand Down

0 comments on commit 1f14a55

Please sign in to comment.