Skip to content

Commit

Permalink
Ignore CSV log files
Browse files Browse the repository at this point in the history
Some Postgres installations are configured to log both standard-format
log files and CSV log files to the same directory, but the collector
currently reads all files specified in a db_log_location, which works
poorly with this setup.

Since we already ignore some files (zipped log files), and we do not
support parsing CSV files, add CSV log files to this list.

Fixes #83
  • Loading branch information
msakrejda committed Feb 12, 2021
1 parent 02008e3 commit 0be1918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion input/system/selfhosted/log_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func isAcceptableLogFile(fileName string, fileNameFilter string) bool {
return false
}

if strings.HasSuffix(fileName, ".gz") || strings.HasSuffix(fileName, ".bz2") {
if strings.HasSuffix(fileName, ".gz") || strings.HasSuffix(fileName, ".bz2") || strings.HasSuffix(fileName, ".csv") {
return false
}

Expand Down

0 comments on commit 0be1918

Please sign in to comment.