MicroStrategy ONE

Excluding Specific Logging Information

There are several ways to reduce the amount of information written to the log file.

To accomplish either or these, you first add the following line of code in the custom logger.properties file.

fileH.filter=com.microstrategy.web.app.utils.log.GlobClassMethodTracingFilter

Excluding logging information for particular classes and methods

To exclude logging information for particular classes and/or methods, you include a second line of code that adds a filter.exclude property to specify the class(es) and/or method(s) to be excluded, in the format <fully-qualified class name>#<method name>. You can use the asterisk wildcard ( * ) in either the class or the method name to allow any text. You can specify multiple classes or methods by including multiple values separated by commas ( , ) and/or semicolons ( ;).

Although the requirement is that the class name be fully-qualified, you can use the * wild card as part or all of the class name.

Some examples of the second line of code are shown below:

  • To exclude log messages generated from a particular class, you next add the following line of code in the logger.properties file.

    fileH.filter.exclude=<class name>

  • To exclude log messages generated from a particular method in a class, you next add the following line of code in the logger.properties file.

    fileH.filter.exclude=<fully-qualified class name>#<method name>

  • To exclude log messages generated from all classes whose name includes specific text, you next add the following line of code in the logger.properties file.

    fileH.filter.exclude=*<specific text>

  • To exclude log messages generated from all methods in a particular class whose name includes specific text, you next add the following line of code in the logger.properties file.

    fileH.filter.exclude=<fully-qualified class name>#*<specific text>

  • To exclude log messages generated from multiple specific classes, you next add the following code in the logger.properties file.

    fileH.filter.exclude=<fully-qualified class1 name>;<fully-qualified class2 name>;<fully-qualified class3 name>

  • To exclude log messages generated from multiple specific methods, you next add the following code in the logger.properties file.

    fileH.filter.exclude=<fully-qualified class1 name>#<method1 name>;<fully-qualified class1 name>#<method2 name>;<fully-qualified class2 name>#<method1 name>

  • To exclude log messages generated from all of the methods in a particular class, you next add the following code in the logger.properties file.

    fileH.filter.exclude=*<fully-qualified class name>*

Excluding the trace file for all included classes and methods

To reduce the amount of information in the log file, you can choose to exclude the trace file for all classes and methods for which logging is performed. To accomplish this, you add another line that sets the filter.trace property to "false".

fileH.filter.trace=false