mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 03:15:42 +03:00
fix: increase log rotator line scan limit
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 https://github.com/hashicorp/nomad/issues/4699 Signed-off-by: Christian Winther <jippignu@gmail.com>
This commit is contained in:
@@ -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
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user