MicroStrategy ONE

Logging Messages for a Package That Contains Your Custom Classes

This example assumes you already have created a Log class for your package. Refer to Implementing Logging for Custom Classes for detailed explanation on creating a Log class for a new package. In this example, all WARNINGS are logged to the debugging monitor for the package com.microstrategy.web.app.customclasses. Add the following code in the custom logger.properties file.

# Specify the logging level as WARNING for the logger object in

# the package com.microstrategy.web.app.customclasses

com.microstrategy.web.app.customclasses.Log.level=WARNING

# Define an alias for a handler object.

com.microstrategy.web.app.customclasses.Log.handlers=handler1

# Define the handler as DebugMonitorHandler so the logger object

# passes the log records to a debugging monitor.

com.microstrategy.web.app.customclasses.Log.handler1.class = com.microstrategy.utils.log.DebugMonitorHandler

# Instruct the DebugMonitorHandler to accept log messages

# of logging level WARNING or higher

com.microstrategy.web.app.customclasses.Log.handler1.level=WARNING

# Format the log messages using the formatter called ExtendedFormatter.

com.microstrategy.web.app.customclasses.Log.handler1.formatter= com.microstrategy.utils.log.ExtendedFormatter

# Instruct the Root Logger to accept log messages

# of logging level SEVERE or higher.

level= SEVERE