Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
fix: increase log rotator line scan limit
Browse files Browse the repository at this point in the history
In case where gelf/json logging is used, its fairly easy to exceed the 16k limit, resulting in json output being cut up into multiple strings

the result is invalid json lines which can create all kind of badness in the logging server

This fixes hashicorp#4699

Signed-off-by: Christian Winther <[email protected]>
  • Loading branch information
jippi committed Oct 9, 2018
1 parent 6e369c6 commit 5314bfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/driver/logging/rotator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const (
// logBufferSize is the size of the buffer.
logBufferSize = 32 * 1024
logBufferSize = 64 * 1024

// bufferFlushDuration is the duration at which we flush the buffer.
bufferFlushDuration = 100 * time.Millisecond
Expand All @@ -26,7 +26,7 @@ const (
// lines when approaching the end of the file to avoid a log line being
// split between two files. Any single line that is greater than this limit
// may be split.
lineScanLimit = 16 * 1024
lineScanLimit = 32 * 1024

// newLineDelimiter is the delimiter used for new lines.
newLineDelimiter = '\n'
Expand Down

0 comments on commit 5314bfc

Please sign in to comment.