MicroStrategy ONE
Logging to a Debugging Monitor and a File
In this example, all SEVERE (error) messages are logged to the debugging monitor and WARNINGS to the file in C:\websdk\logs\warnings.txt. Add the following code in the custom logger.properties file.
# Instruct the Root Logger to accept log messages
# of logging level SEVERE or higher.
level= SEVERE
# Define an alias for two handler objects. handler1 will send errors
# to the Debugging monitor while handler2 will send warnings to a file.
handlers=handler1, handler 2
# Define the first handler as DebugMonitorHandler so the logger object
# passes the log records to a system console.
handler1.class =com.microstrategy.utils.log.DebugMonitorHandler
# Instruct the DebugMonitorHandler to accept log messages
# of logging level SEVERE or higher
handler1.level=SEVERE
# Format the log messages using the formatter called XMLFormatterEx.
handler1.formatter= com.microstrategy.web.app.XMLFormatterEx
# Configure the second handler by defining the handler
# as DatedFileHandler so the logger object
# passes the log records to a file.
Handler2.class =com.microstrategy.utils.log.DatedFileHandler
# Instruct the DatedFileHandler to accept log messages
# of logging level WARNING or higher
Handler2.level=WARNING
# Format the log messages using the formatter called XMLFormatterEx.
Handler2.formatter=com.microstrategy.web.app.XMLFormatterEx
# Indicate the destination for the resulting messages.
Handler2.pattern=c:/websdk/logs/warnings.txt