Skip to content
  • Categories
Collapse
Solibri Society Forum
  1. Home
  2. Comments & Feedback
  3. Tech Talks
  4. Custom log file location

Custom log file location

Scheduled Pinned Locked Moved Solved Tech Talks
1 Posts 1 Posters 441 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MattiM Offline
    MattiM Offline
    Matti Solibrians
    wrote on last edited by Matti
    #1

    Configuring Custom Log File Locations in Solibri
    To enhance system management or comply with specific IT policies, it may be necessary to define a custom storage location for Solibri’s application log files. This process involves two main steps: directing Solibri to a custom configuration file and then editing that file to specify the new log path.

    Step 1: Specify the logback.xml Configuration File Path

    First, you must instruct Solibri to use an external logging configuration file. This is done by editing the Solibri.vmoptions file.

    Navigate to and open the following file in a text editor:

    C:\Program Files\Solibri\SOLIBRI\Solibri.vmoptions
    

    Add the following line to the file. This parameter tells Solibri where to find the logging configuration:

    -Dlogback.configurationFile=C:\Path\To\Your\logback.xml
    

    Example: To use a configuration file located in a public directory, you would add:

    -Dlogback.configurationFile=C:\Users\Public\Solibri\logback.xml
    

    Step 2: Define the Custom Log File Location

    Next, create or edit the logback.xml file at the location you specified in the previous step. This XML file controls various logging settings, including the output file’s location.

    Within the logback.xml file, locate the <file> element inside the <appender> section.

    Modify the path within this element to point to your desired log file location and name.

    <file>C:/Users/Public/Solibri/log/runtime.log</file>
    

    Example logback.xml Configuration:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    		<encoder>
    			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSSZ} [%thread] %-5level %logger{36} - %msg%n
    			</pattern>
    		</encoder>
    	</appender>
    
    	<appender name="FILE"
    		class="ch.qos.logback.core.rolling.RollingFileAppender">
    		<file>C:/Users/Public/Solibri/log/runtime.log</file>
    		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
    			<!-- daily rollover -->
    			<fileNamePattern>log/runtime-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
    
    			<!-- keep 30 days' worth of history -->
    			<maxHistory>30</maxHistory>
    
    			<!-- each file should be at most 100MB -->
    			<maxFileSize>100MB</maxFileSize>
    
    			<!-- overall archive size reaches 10GB -->
    			<totalSizeCap>10GB</totalSizeCap>
    		</rollingPolicy>
    
    		<encoder>
    			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSSZ} [%thread] %-5level %logger{36} - %msg%n
    			</pattern>
    		</encoder>
    	</appender>
    	
    	<root level="INFO">
    		<appender-ref ref="FILE" />
    		<appender-ref ref="STDOUT" />
    	</root>
    </configuration>
    
    1 Reply Last reply
    1
    • MattiM Matti marked this topic as a question on
    • MattiM Matti has marked this topic as solved on
    • MattiM Matti unlocked this topic on

    Copyright © 2025 Solibri Inc. | Powered by NodeBB

    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories