Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FlushInterval is the longest time that the logger will buffer logs in memory before // flushing them to the database. This is set low to ensure a good user experience. FlushInterval = 20 * time.Millisecond // BufferSize is the largest number of logs lines that can be buffered before flushing them to // the database. For the strategy of many-rows-per-insert, performance was significantly worse // below 500, and no improvements after 1000. BufferSize = 1000 )
Functions ¶
func CreateLogFromMaster ¶
CreateLogFromMaster creates a tasklog of the format that we expect when it comes from master.
func SetDefaultLogger ¶
func SetDefaultLogger(l *Logger)
SetDefaultLogger sets the task.Logger singleton used by package-level functions.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is an abstraction for inserting master-side inserted task logs, such as scheduling and provisioning information, or container exit statuses. TODO(DET-9537): Add graceful shutdown for the tasklogger, so that when we intentionally blip the master for something like a configuration update we do not lose logs.
Click to show internal directories.
Click to hide internal directories.