Custom log file location
-
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.vmoptionsAdd the following line to the file. This parameter tells Solibri where to find the logging configuration:
-Dlogback.configurationFile=C:\Path\To\Your\logback.xmlExample: To use a configuration file located in a public directory, you would add:
-Dlogback.configurationFile=C:\Users\Public\Solibri\logback.xmlStep 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> -
M Matti marked this topic as a question on
-
M Matti has marked this topic as solved on
-
M Matti unlocked this topic on
Copyright © 2025 Solibri Inc. | Powered by NodeBB