liveBook · Manning

Log rotation

Log rotation is the practice of closing, replacing, archiving, compressing, or deleting log files according to size, age, or retention policies.

How 4 Manning books explain it

Troubleshooting Java, Second Edition

File rotation is a logging technique that distributes successive log data across bounded files and replaces or archives older files.

How it is used
Supports GC-log troubleshooting by limiting storage growth and making relevant files easier to transfer, collect, and analyze.
How deep it goes
Explains file-count and size limits, rollover behavior, indexed files, and oldest-file replacement without descending into JVM logging internals.
Examples
Uses a Java command configured for five 10 MB files and mentions timestamp-based filtering with find or Get-ChildItem.
What you can do after
Operate/configure JVM GC logging with bounded files and select relevant rotated logs for later analysis.

Read how Troubleshooting Java, Second Edition explains log rotation →

Logs and Telemetry

Log rotation is the practice of renaming or replacing a growing log file and continuing writes in a new file.

How it is used
Protects long-running log ingestion from oversized files, missed events, and duplicate reads during process restarts.
How deep it goes
Explains persistent progress tracking and demonstrates rotation-aware Fluent Bit tail settings without detailing rotation implementation.
Examples
Uses Fluent Bit tail configurations with a SQLite DB, rotate_wait, ignore_older, and a moved-then-deleted file lifecycle.
What you can do after
Operate/configure it with Fluent Bit tail state and rotation settings to resume file ingestion without reingesting prior events.

Read how Logs and Telemetry explains log rotation →

Learn Docker in a Month of Lunches, Second Edition

Log rotation is the practice of limiting log-file size by switching to new files and retaining or overwriting older files according to a configured policy.

How it is used
Controls Docker container log growth so noisy applications cannot fill the host disk.
How deep it goes
Explains size limits, file counts, overwrite behavior, configuration scope, commands, and verification, without covering external log processors.
Examples
Uses a Docker container configured with three 5 KB files and verifies settings and archived filenames.
What you can do after
Operate/configure Docker log rotation for individual containers or Engine-wide defaults and verify the resulting files.

Read how Learn Docker in a Month of Lunches, Second Edition explains log rotation →

PostgreSQL Mistakes and How to Avoid Them

Log rotation is the practice of periodically closing, renaming, compressing, or deleting log files to control their storage use.

How it is used
Controls PostgreSQL log growth so runaway logging does not exhaust storage or threaten database availability.
How deep it goes
Explains separate filesystems, size limits, rotation parameters, and retention trade-offs; stops short of a complete deployment procedure.
Examples
Uses runaway error logging and a missing-relation log entry to demonstrate storage risk and diagnostic value.
What you can do after
Operate/configure PostgreSQL logging with separate storage, rotation parameters, size limits, and deliberate retention.

Read how PostgreSQL Mistakes and How to Avoid Them explains log rotation →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.