Increase the Size of Diagnostic Logs for Office – Microsoft 365 Apps

Microsoft Technical Article






Office Diagnostic Logging Configuration for IT Admins

Advanced Configuration: Expanding Microsoft Office Diagnostic Log Capacity

🚀 Overview

In all modern, supported iterations of Microsoft Office applications, diagnostic logging is an integrated, “always-on” background process. This telemetry is designed to capture application behavior and state transitions to assist in root-cause analysis. By default, the logging engine operates with a circular buffer restricted to approximately 120 MB per individual application.

For IT Administrators investigating complex, intermittent, or deep-seated performance issues, the default 120 MB threshold is often insufficient, as critical data may be overwritten before the log files can be harvested. To ensure a comprehensive data set is available for debugging, administrators can manually override the default buffer size, allowing for a larger window of historical diagnostic data to be retained on the local storage.

⚙️ Key Technical Details

The process of expanding log capacity involves using a specific batch utility provided by Microsoft to modify the logging parameters. Follow the technical workflow below to prepare the environment and execute the expansion:

  • Pre-requisites: Obtain the OfficeDiagnosticLogging.zip package and extract its contents to a local directory that is easily accessible via an elevated command prompt.
  • Application State: Before initiating the expanded logging mode, ensure that all instances of the Office application currently under investigation (e.g., Word, Excel, Outlook) are completely terminated.
  • Command Execution: Navigate to the extraction folder in your command shell and execute the following string:

    OfficeDiagnosticLogging.bat start -MaxSizeIn100MB 4

    Note: In the command above, the integer 4 acts as a multiplier for 100 MB blocks. Executing this specific command sets a 400 MB limit per application. You may adjust this value based on your specific troubleshooting requirements and available disk overhead.

  • Data Flushing: Once the issue has been successfully reproduced within the Office application, you must close all windows of the affected application. This step is critical as it triggers the process to flush all cached log data from memory to the physical disk.
  • Log Location and Harvesting:

    • Navigate to the local diagnostic repository: %temp%\diagnostics.
    • Access the sub-folder corresponding to the specific application (e.g., WINWORD, EXCEL, or POWERPNT).
    • Identify the relevant files by sorting by “Date modified.”
    • Best Practice: Collect all .log files starting from at least one hour prior to the incident through the most recent entry.

🛡️ Impact

Modifying these parameters has several implications for the administrative workflow and the local endpoint:

  • Improved Troubleshooting Accuracy: Increasing the log ceiling prevents the “wrapping” of logs, ensuring that the lead-up to a crash or error is preserved for Microsoft Support or internal analysis.
  • Storage Considerations: Since logs are stored per-application, setting a high multiplier (e.g., -MaxSizeIn100MB 10) can consume significant space if multiple Office applications are running diagnostic traces simultaneously.
  • Data Portability: Because the expanded logs result in larger file sizes, it is recommended to compress the collected files into a single .zip archive before transmission to reduce upload times and bypass attachment size limits in support portals.

Official Source: Read the full article on Microsoft.com