You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »


Perspectium Meshlets produces logs to help you troubleshoot and debug issues with the meshlet. You can modify the meshlet logs by setting the rolling policy. To learn more about rolling policies, check here

Prerequisites


(warning) First, contact Perspectium Support to get the logback-spring.xml logging configuration file. 


Procedure

To configure the meshlet logs, follow these steps: 


Edit the logback file

Place the logback-spring.xml file Perspectium Support provided for you in the config folder where the meshlet is installed. If there is no config folder, create the folder at the same location as the meshlet's executable jar file.

Open the logback-spring.xml file in the text editor of your choice. Then, edit the rolling policy under the <rollingPolicy> directive.

For example, if you want to change the maximum size of the log file to 10 MB, you can set the size in the <maxFileSize> directive. When the size of the log file reaches 10 MB, a new log file will get created. 

If you want to control how many log files are kept before old ones are deleted, enter a value in the <maxHistory> directive, with the <cleanHistoryOnStart> directive set to true.

<rollingPolicy 
	class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
	<!-- rollover daily and when the file reaches 10 MegaBytes -->
	<fileNamePattern>${LOGS}/archived/perspectium-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
	<timeBasedFileNamingAndTriggeringPolicy
		class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
		<maxFileSize>10MB</maxFileSize>
	</timeBasedFileNamingAndTriggeringPolicy>

	<!-- keep 10 log files -->
	<maxHistory>10</maxHistory>
	<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>

Run the meshlet

Add the -Dlogging.config="./config/logback-spring.xml" argument to the command to run your meshlet. 

Linux:

 java -Dspring.profiles.active=dev -Dlogging.config="./config/logback-spring.xml" -jar <perspectium-meshlet>.jar


Windows: 

 java -Dspring.profiles.active=dev -Dlogging.config=".\config\logback-spring.xml" -jar <perspectium-meshlet>.jar

Where <perspectium-meshlet>.jar is the name of Perspectium Meshlet Application to run.