# Externalize log4j.properties in Windows

This article describes the steps to externalize the log4j.properties file for the OvalEdge application deployed on Apache Tomcat in a Windows environment. Externalizing the logging configuration enables updates to log levels, appenders, and file locations without redeploying the application. This approach supports easier maintenance and environment-specific configurations.

### Prerequisites

Ensure the following conditions are met before proceeding:

* Access to the Windows server hosting the OvalEdge application
* Administrative permissions to modify Apache Tomcat configuration and restart services
* Apache Tomcat installation (for example: C:\ovaledge\apache-tomcat-10.1.40)
* Java runtime installed and configured
* Text editor (for example: Notepad++, VS Code, or Notepad)

### Configuration Steps

1. Access the Application Server
   * Access the Windows server using Remote Desktop Protocol (RDP) or console access.<br>

     ***Sample Reference Screenshot***

     <figure><img src="/files/ZehDG2xsiiESOo4iDzRa" alt=""><figcaption></figcaption></figure>
2. Create External Configuration Directory and Copy File
   * Open Command Prompt or PowerShell with administrative privileges.
   * Create the external configuration directory:

     ```bash
     mkdir C:\ovaledge\extprop
     ```

     \
     \&#xNAN;***Sample Reference Screenshot***

     <figure><img src="/files/E9T04mOfizwNIPSNiYXQ" alt=""><figcaption></figcaption></figure>
   * Place the log4j.properties file in the following directory:

     ```bash
     C:\ovaledge\extprop\log4j.properties
     ```

     \
     \&#xNAN;***Sample Reference Screenshot***

     <figure><img src="/files/8lra5r8cZgcfGXoYpn1c" alt=""><figcaption></figcaption></figure>
3. Modify the External log4j.properties File
   * Open the file:

     ```bash
     C:\ovaledge\extprop\log4j.properties
     ```

   * Update logging properties based on requirements. \
     **Example:**

     ```bash
     #log4j.rootLogger=INFO, CONSOLE
     log4j.rootLogger=INFO, FILE
     ```

     \
     \&#xNAN;***Sample Reference Screenshot***

     <figure><img src="/files/RezpO8k1Wvzlr7cHr9aX" alt=""><figcaption></figcaption></figure>
4. Configure Tomcat to Use External log4j.properties&#x20;
   * Navigate to the Tomcat bin directory:<br>

     ```bash
     C:\ovaledge\apache-tomcat-10.1.40\bin
     ```

   * Open the Tomcat service configuration from this directory.\
     \
     \&#xNAN;***Sample Reference Screenshot***

     <figure><img src="/files/gdy5E7XrlqF5i1TU42pV" alt=""><figcaption></figcaption></figure>

   * In the Java tab, add the following parameter under Java Options:

     ```bash
     -Dlog4j.configuration=file:C:\path\to\extprop\log4j.properties
     ```

     \
     \&#xNAN;***Sample Reference Screenshot***\
     ![](/files/BJptqt7kyeDSYViSpjpS)
5. Restart Apache Tomcat
   * Restart Apache Tomcat to apply the configuration changes.
   * If running as a Windows service, restart using Services (services.msc) or command-line tools.\
     \
     \&#xNAN;***Sample Reference Screenshot***

     <figure><img src="/files/a26C8TEl9oMo7GFIxY3o" alt=""><figcaption></figcaption></figure>

***

Copyright © 2026, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/deployment-and-maintenance/configuration/externalize-log4j.properties-in-windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
