Hi Members,
I wanted to check if we can update any config file so that the SAS Studio mid tier logs are rolled over based on the file size. The log grows at a tremendous pace and would like to ensure that we keep an eye on its size. It is present under
<sas config>/Lev1/Web/Logs/SASServer2*/SASStudioMidTier.log
Thanks in advance,
SK
I believe there is no documentation about it in documentation.sas.com ( http://documentation.sas.com/?docsetId=logug&docsetTarget=p0vt6dps7nzkbgn0zntzi3qs3a0d.htm&docsetVer... ), however this system is based on a broadly commonly used Log4J and Apache.
https://wiki.apache.org/logging-log4j/Log4jXmlFormat
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="stdout" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <!-- Pattern to output the caller's file name and line number --> <param name="ConversionPattern" value="%5p [%t] (%F:%L) - %m%n"/> </layout> </appender> <appender name="R" class="org.apache.log4j.RollingFileAppender"> <param name="file" value="example.log"/> <param name="MaxFileSize" value="100KB"/> <!-- Keep one backup file --> <param name="MaxBackupIndex" value="1"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%p %t %c - %m%n"/> </layout> </appender> <root> <priority value ="debug" /> <appender-ref ref="stdout" /> <appender-ref ref="R" /> </root> </log4j:configuration>
Look at the logconfig.xml of your workspace server.
Hello @shirishkamath,
not the workspace server logs, but "sas/config/Lev1/Web/Common/LogConfig/SASStudio-log4j.xml"
You are looking for to un-comment the rolling appended functions
<!-- A time/date based rolling appender <appender class="org.apache.log4j.DailyRollingFileAppender" name="SAS_FILE"> <param name="datePattern" value="'.'yyyy-MM-dd"/> <param name="append" value="true"/> <param name="file" value="${config.lev.web.appserver.logs.dir}/SASStudioMidTier3.4.log"/> <layout class="com.sas.svcs.logging.CustomPatternLayout"> <param name="ConversionPattern" value="%d [%t] %-5p [%u] %c - %m%n"/> </layout> </appender> -->
I believe there is no documentation about it in documentation.sas.com ( http://documentation.sas.com/?docsetId=logug&docsetTarget=p0vt6dps7nzkbgn0zntzi3qs3a0d.htm&docsetVer... ), however this system is based on a broadly commonly used Log4J and Apache.
https://wiki.apache.org/logging-log4j/Log4jXmlFormat
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="stdout" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <!-- Pattern to output the caller's file name and line number --> <param name="ConversionPattern" value="%5p [%t] (%F:%L) - %m%n"/> </layout> </appender> <appender name="R" class="org.apache.log4j.RollingFileAppender"> <param name="file" value="example.log"/> <param name="MaxFileSize" value="100KB"/> <!-- Keep one backup file --> <param name="MaxBackupIndex" value="1"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%p %t %c - %m%n"/> </layout> </appender> <root> <priority value ="debug" /> <appender-ref ref="stdout" /> <appender-ref ref="R" /> </root> </log4j:configuration>
Hi @JuanS_OCS ,
On .../config/Lev1/Web/Common/LogConfig there is a config file for each components on my web server. There is any way to change make this change to all (general config file) or I need to change one by one?
Regards,
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.