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
- Place the Line Format in the Logging Configuration
- Arrange Fields With a Pattern
- Choose UTC or Local Timestamps
- Choose Compact or Descriptive Level Names
- Show the Useful Part of a Stream Name
- Bound Left-Truncated Stream Names
- Keep Multiline Messages or Only Their First Line
- Limit the Message by Character Count
- Limit the Complete Rendered Line
- Choose a Clear Truncation Mark
- Keep Producer Byte Limits Separate
- Configuring Log Manager Limits
- Install the Options With the Complete Configuration
- Bound the Number of Waiting Entries
- Bound the Storage Retained by the Queue
- Protect Entry Slots for Warnings and Errors
- Protect Queue Storage for Warnings and Errors
- Bound Each Message Before It Reaches the Queue
- Give the Worker Time to Finish During Shutdown
- Read Statistics as a Point-in-Time Snapshot
- Using Trace Sections
- Understand What a Trace Section Controls
- Design Sections Around Investigations
- Attach a Stable Section When Creating the Stream
- Enable the Section and a Matching Destination
- Guard Preparation That Exists Only for Tracing
- Keep the Trace Policy Stable After Startup
- Understand What Runtime Replacement Would Do
- Using Log Writers
- Understand the Writer’s Place in the Log System
- Add a Writer to the Configuration
- Route the Right Entries to Each Writer
- Choose a Writer for Each Audience
- 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
- Introduce a Custom Destination Only When Necessary
- Writing Logs to the Console
- Writing Logs to Files
- Add a File Writer to a Log Configuration
- Create the Options With the Active Path
- Choose Append or Overwrite for the First Open
- Select When the File Rotates
- Set the Byte Threshold for Size Rotation
- Limit the Number of Retained Archives
- Cooperate With External File Replacement
- Understand Failures and Recovery
- Sending Logs to Syslog
- Add a Syslog Writer to the Configuration
- Create and Pass the Options Object
- Choose UDP, TCP, or TLS Transport
- Select the Collector Endpoint
- Choose the RFC Facility
- Identify the Producing Host
- Name the Application
- Identify the Process Instance
- Classify the Message Family
- Understand the Resulting RFC Header
- Select the TLS Configuration Label
- Bound Pending Network Data
- Plan for Collector and Network Failures
- Loading Logging Configuration
- Writing an ELCL Logging Configuration
- Start With One Useful Destination
- Make Operational Choices Explicit
- Shape Every Log Line
- Give the Manager a Clear Resource Budget
- Enable the Trace Detail You Need
- Connect Entries to Their Destinations
- Keep Terminal Output Comfortable to Read
- Preserve an Operational History in Files
- Send Service Logs to a Syslog Collector