Documentation
¶
Overview ¶
Package jsonlog appends records to a JSON Lines file that rotates by size: the API audit log and the webhook delivery log. Files are mode 0600 in a 0700 directory, because both name tokens and endpoints.
Index ¶
Constants ¶
const DefaultMaxBytes = 5 << 20
DefaultMaxBytes is the size at which a log rotates.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct {
Path string
// MaxBytes rotates the file before a write would take it past this;
// zero is DefaultMaxBytes.
MaxBytes int64
// Keep is how many rotated files to keep; zero keeps one.
Keep int
// contains filtered or unexported fields
}
Log is one rotating JSON Lines file. Path.1 is the previous file; Keep older ones are kept as Path.2 and so on.