Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Mondrian configure MDX logging

  1. #1
    Join Date
    Oct 2012

    Default Mondrian configure MDX logging

    Hi there,

    I'm using mondrian to an academic project. I'm building a dashboard with some widgets that display data provided from a mondrian cube. The dashboard is displayed in a website (using java/jsp, tomcat 7). I'm using the foodmart sample at the moment. Everything is working, but now i need to get the MDX logs from mondrian, to check wich queries were executed and their execution time.

    I've read the documentation about logging ( but i couln't make it work. I've also searched in the web, but all the tutorials i've found were refering to a log4j.xml file, but in my Tomcat7/webapps/mondrian/WEB-INF/classes/ i only have the file

    I tried to put this in my Tomcat7/webapps/mondrian/WEB-INF/classes/

    # Set root logger level to DEBUG and its only appender to MONDRIAN.
    log4j.rootLogger=WARN, MONDRIAN# MONDRIAN is set to be a ConsoleAppender.log4j.appender.MONDRIAN=org.apache.log4j.ConsoleAppender# MONDRIAN uses PatternLayout.log4j.appender.MONDRIAN.layout=org.apache.log4j.PatternLayoutlog4j.appender.MONDRIAN.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n# Trace MDX and SQL statementslog4j.category.mondrian.mdx=DEBUG, MONDRIAN
    Then i set the CATALINA_OPTS environment variable:
    export CATALINA_OPTS="-Xms16m -Xmx256m
    And then, i restarted mondrian through tomcat server, and ran some mdx queries, but no log files were created. I tried to run mdx query from my website, and from the jpivot sample in mondrian webapp.What am i doing wrong? In the documentation, i didn't understand what this line means:Then mondrian with the argument on the Java command line.Can u give me some help?Thanks in advance

  2. #2



    I cannot access my Mondrian setup myself at the moment so am unable to verify, but I have a backup file here which I believe worked for me (on Tomcat6 though):
    log4j.rootLogger=DEBUG, MONDRIAN
    # Log to file
    log4j.category.MONDRIAN.mdx=DEBUG, MONDRIAN
    log4j.category.MONDRIAN.sql=DEBUG, MONDRIAN
    log4j.appender.MONDRIAN.layout.conversionPattern=%L - %m%n
    Perhaps it also works for you. Good luck.

  3. #3
    Join Date
    Mar 2007


    This is the XML equivalent:

    <appender name="MDXLOG" class="org.apache.log4j.RollingFileAppender">
         <param name="File" value="mdx.log"/>
         <param name="Append" value="false"/>
         <param name="MaxFileSize" value="500KB"/>
         <param name="MaxBackupIndex" value="1"/>
         <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
       <category name="mondrian.mdx">
          <priority value="DEBUG"/>
          <appender-ref ref="MDXLOG"/>
    Luc Boudreau
    aka. Luc le Magnifique
    aka. Monsieur Oui Oui

    Lead Engineer, Pentaho Corporation
    Twitter: luclemagnifique
    IRC: Monsieur_Oui_Oui@freenode

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.