|
|
@ -84,6 +84,7 @@ func NewLogger(cfg Config, logf tslogger.Logf) *Logger {
|
|
|
|
cfg.Buffer = NewMemoryBuffer(pendingSize)
|
|
|
|
cfg.Buffer = NewMemoryBuffer(pendingSize)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
l := &Logger{
|
|
|
|
l := &Logger{
|
|
|
|
|
|
|
|
privateID: cfg.PrivateID,
|
|
|
|
stderr: cfg.Stderr,
|
|
|
|
stderr: cfg.Stderr,
|
|
|
|
stderrLevel: int64(cfg.StderrLevel),
|
|
|
|
stderrLevel: int64(cfg.StderrLevel),
|
|
|
|
httpc: cfg.HTTPC,
|
|
|
|
httpc: cfg.HTTPC,
|
|
|
@ -133,6 +134,7 @@ type Logger struct {
|
|
|
|
uploadCancel func()
|
|
|
|
uploadCancel func()
|
|
|
|
explainedRaw bool
|
|
|
|
explainedRaw bool
|
|
|
|
metricsDelta func() string // or nil
|
|
|
|
metricsDelta func() string // or nil
|
|
|
|
|
|
|
|
privateID PrivateID
|
|
|
|
|
|
|
|
|
|
|
|
shutdownStart chan struct{} // closed when shutdown begins
|
|
|
|
shutdownStart chan struct{} // closed when shutdown begins
|
|
|
|
shutdownDone chan struct{} // closed when shutdown complete
|
|
|
|
shutdownDone chan struct{} // closed when shutdown complete
|
|
|
@ -153,6 +155,11 @@ func (l *Logger) SetLinkMonitor(lm *monitor.Mon) {
|
|
|
|
l.linkMonitor = lm
|
|
|
|
l.linkMonitor = lm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// PrivateID returns the logger's private log ID.
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// It exists for internal use only.
|
|
|
|
|
|
|
|
func (l *Logger) PrivateID() PrivateID { return l.privateID }
|
|
|
|
|
|
|
|
|
|
|
|
// Shutdown gracefully shuts down the logger while completing any
|
|
|
|
// Shutdown gracefully shuts down the logger while completing any
|
|
|
|
// remaining uploads.
|
|
|
|
// remaining uploads.
|
|
|
|
//
|
|
|
|
//
|
|
|
|