Logging
The logging framework records diagnostic messages without making application threads wait for slow output devices. These topics lead from the application defaults to explicitly configured writers, bounded queues, and ELCL-based startup configuration.
- Logging Overview
- Choosing a Logging Setup
- Writing Log Messages
- Configuring Logging in Code
- Formatting Log Lines
- Setting the Default Log Line Format
- Line Patterns and Field Placeholders
- UTC and Local Timestamp Formats
- Severity Name Formats
- Stream Name Formats
- Left-Truncated Stream Name Limits
- Multiline Messages and First-Line Truncation
- Message Character Limits
- Total Rendered Line Limits
- Truncation Marks
- Per-Writer Line Formats
- Producer Message Limits versus Rendered Line Limits
- Configuring Log Manager Limits
- Using Trace Sections
- Trace-Section Filtering and Log Levels
- Attaching Trace Sections to Log Streams
- Guarding Trace Preparation with traceEnabled()
- Naming and Grouping Trace Sections
- Enabling Trace Sections and Matching Writer Routes
- Trace-Section Configuration at Startup
- Runtime Configuration Replacement and Trace Flags
- Using Log Writers
- Log Writers, Manager Delivery, and Routes
- Add a Writer to the Configuration
- Route the Right Entries to Each Writer
- Console, File, and Syslog Writers
- Show Immediate Feedback on the Console
- Keep Durable Operational History in a File
- Send Service Events to a Syslog Collector
- Recent Errors on Application Exit
- Implementing a Custom Log Writer
- Writing Logs to the Console
- Writing Logs to Files
- Add a File Writer to a Log Configuration
- File Writer Path and Options
- Choose Append or Overwrite for the First Open
- Time-Based and Size-Based File Rotation
- Set the Byte Threshold for Size Rotation
- Rotated Archive Retention
- External File Replacement and Automatic Reopening
- File Writer Failures and Recovery
- Sending Logs to Syslog
- Add a Syslog Writer to the Configuration
- Syslog Log Writer Options
- Choose UDP, TCP, or TLS Transport
- Select the Collector Endpoint
- Choose the RFC Facility
- Host Name: HOSTNAME
- Application Name: APP-NAME
- Process Identifier: PROCID
- Message Identifier: MSGID
- RFC 5424 Header Format
- Select the TLS Configuration Label
- Bound Pending Network Data
- Plan for Collector and Network Failures
- Loading Logging Configuration
- Logging Configuration File Locations
- Load a Dedicated
log.elcl - Load
LogFromapplication.elcl - Validate the Log Configuration Before Parsing
- Parsing and Installing a Logging Configuration Snapshot
- Root, Nested, and Invalid Logging Configuration Examples
- Application Reporting of Logging Configuration Errors
- Writing an ELCL Logging Configuration
- Minimal Console Writer Configuration
- Queue Limits, Line Formats, and Log Routing
- Default Log Line Format
- Log Queue Limits, Reservations, and Shutdown Timeout
- Enabled Trace Sections
- Writer Routes and Level/Path Filters
- Per-Writer Log Line Formats
- Console Paragraph Layout and Wrapping
- File Paths, Rotation, and Archive Retention
- Syslog Transport, Collector, and Header Fields