Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

What Log Levels Mean—and How Rotation Keeps Log Files Under Control

Log severity filters which events proceed; log rotation limits file growth and retained history. See how Python defines levels and what to consider for rotation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Log levels tell an application how important an event is; log rotation controls how much log data stays on disk. They solve different problems: a severity threshold filters which messages proceed, while a rotation policy starts new files and limits retained history.

What do DEBUG, INFO, WARNING, and ERROR mean?

These labels are common, but their precise meanings and numeric values depend on the logging system. In Python’s standard logging guidance, levels run from less severe to more severe as DEBUG, INFO, WARNING, ERROR, and CRITICAL.

As an Amazon Associate I earn from qualifying purchases.

Python level Meaning in Python’s documentation Typical use
DEBUG Detailed information useful for diagnosing problems. Record internal steps or diagnostic context when investigating an issue.
INFO Confirmation that things are working as expected. Record meaningful milestones in normal operation.
WARNING An unexpected occurrence or possible near-future problem while the software continues to work as expected. Record recoverable conditions that merit attention, such as low disk space.
ERROR A more serious problem that prevented the software from performing a function. Record a failed operation that the application can otherwise continue past.
CRITICAL A serious error indicating the program itself may be unable to continue. Signal a condition that threatens continued operation.

These definitions come from the Python 3.14.8 Logging HOWTO; they are not a universal contract for every framework. In Python’s level table, the corresponding values are DEBUG 10, INFO 20, WARNING 30, ERROR 40, and CRITICAL 50. Those values belong to Python’s system and should not be assumed to match another platform.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How does a log-level threshold filter messages?

A threshold is a minimum severity for a record to pass. In Python, setting a logger threshold to INFO allows INFO and more severe records through, while suppressing DEBUG. The logger’s threshold is not necessarily the last filter: each handler can apply its own threshold before sending a record to its destination.

#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

The flow is: application code creates a record at a level; the logger decides whether it proceeds; one or more handlers route accepted records to destinations such as a console, file, email, or remote service. A handler can further narrow what reaches its destination. Python’s HOWTO describes, for example, sending all messages to a file, errors and above to standard output, and critical messages to email.

This is filtering and routing, not necessarily deletion at the line where the logging call appears. Whether a record is emitted, and where it goes, depends on logger and handler configuration. Python’s documented default threshold is WARNING, so DEBUG and INFO messages are not tracked under that default unless configuration lowers it. Defaults vary by framework.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Should an application log an error or raise an exception?

Logging an error and raising an exception do different jobs. An exception signals that an operation failed and allows the program or caller to handle that failure. Logging records information for operators or diagnosis. Python’s HOWTO advises that command-line output may use print(), while an error condition generally calls for raising an exception. Logging an error is appropriate when suppressing the error is intentional—for example, a long-running server handles a failed request and continues rather than exiting.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why do applications rotate log files?

Logs accumulate as applications run. Rotation manages file growth and retained history, independently of severity: it can move logging to a new file after a configured size or elapsed time, then keep a limited set of older files or discard them according to the policy. It does not decide whether an event is DEBUG or ERROR.

Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Size-based rotation

Use size-based rotation when the key operational limit is how large a file may become. Python’s RotatingFileHandler can open a new file after a maximum size is reached and retain a configured number of backups. With the backup count and size threshold chosen, the number of files and approximate disk use can be bounded.

Time-based rotation

Use time-based rotation when separate files aligned to hours, days, or another time interval make operations or review easier. Python provides TimedRotatingFileHandler. The interval and retention settings should reflect the history needed for troubleshooting and the disk budget; the official documentation does not prescribe one universally correct threshold or retention period.

Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

How should retention and deployment shape the design?

  • Choose a trigger: set a size limit if file growth is the main constraint, or a time interval if calendar-aligned log segments are more useful.
  • Set retention deliberately: balance disk capacity against how far back operators may need to investigate. A backup count or time-retention policy is a configuration choice, not a universal best practice.
  • Check the writer model: a simple file-handler rotation setup should not be assumed safe for multiple concurrent processes.

The Python Logging Cookbook warns that web servers such as Gunicorn or uWSGI may run multiple worker processes, and advises against having those workers write directly through file handlers in the application. Its recommended pattern is to send records to a socket listener in a separate process, which owns the file output. That separates concurrent application workers from file management.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why can’t severity numbers be compared across logging systems?

Numeric severity is system-specific. Python assigns larger numbers to more severe levels, from DEBUG 10 to CRITICAL 50. By contrast, RFC 5424 syslog numbers severities from 0 (Emergency) through 7 (Debug), with lower numbers representing greater severity. Do not compare the numbers as if they shared a scale; when forwarding logs between systems, map levels by meaning and verify the receiving system’s conventions.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$208.99
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.