1 Reply Latest reply on Aug 13, 2014 12:32 PM by Ramesh Reddy

    logging and off heap memory usage for embedded teiid server

    gaurav singhal Newbie

      I need to enable command logging to log the queries that are coming to my embedded teiid server version 8.7(that i start as part of an application which uses log4j 1.2). I've followed the documentation here (Logging - Teiid 8.7 - Project Documentation Editor) and here (Chapter 4. Logging) to get the appropriate logging configuration formatting for log4j 1.2 and teiid command log. I basically added the following to my log4j.xml:

       

      <appender name="COMMAND" class="org.apache.log4j.RollingFileAppender">

              <param name="File" value="${tsf.log.dir}/tsf-command.log" />

              <param name="MaxFileSize" value="1000KB" />

              <param name="MaxBackupIndex" value="5" />

              <layout class="org.apache.log4j.PatternLayout">

                  <param name="ConversionPattern"

                      value="%d{dd MMM yyyy HH:mm:ss,SSS z} %-5p [%c] (%t) %m%n" />

              </layout>

          </appender>

       

          <category name="org.teiid.COMMAND_LOG">

              <priority value="DEBUG" />

              <appender-ref ref="COMMAND" />

          </category>

       

      I see the log file being created but i dont see any logs written to it at all when i run queries against the embedded server. Is it because of using log4j 1.2 or some other issue in my configuration or this doesn't work with embedded teiid?

       

      Also I'm want to make my embedded teiid server use off heap memory, looking at this doc Memory Management - Teiid 8.7 - Project Documentation Editor I'm not able to tell how to configure EmbeddedServer using the EmbeddedConfiguration class to use off heap memory. Any help appreciated here.

       

      Thanks,

      Gaurav Singhal

        • 1. Re: logging and off heap memory usage for embedded teiid server
          Ramesh Reddy Master

          Gaurav,

           

          Documentation typically is for running Teiid in JBoss EAP environment. Like above configuration about the logging is JBoss EAP specific. In embedded Teiid, it is up to you where you want channel the log messages. by default they use native java logging modules. If you want you can use "LogManager.setLogger" method to forward they to your favorite logger like Log4J, then use that frameworks configuration to control the logging.

           

          As per buffer manager settings, you can override "protected BufferServiceImpl bufferService" field in EmbeddedServer and add whatever configuration defaults you want.

           

          Ramesh..