pub fn append(path: &Path, bark: &Bark, max_bytes: u64) -> Result<(), BarkError>Expand description
Appends bark to path, evicting oldest-first to keep the file under
max_bytes.
Eviction drops a prefix of whole lines, atomically; an oversized
record is written anyway, since dropping it would silently lose the
one alert too big to fit. Serialized against other appenders by an
advisory lock on a sibling <path>.lock. Concurrent reads are not
blocked: the ring is only ever replaced whole.
ยงErrors
BarkError::Io: the file or its lock could not be read, written, or replaced.BarkError::Encode: the record could not be serialized.