public class

MSTRLog

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.log.MSTRLog

Class Overview

This is the logging infrastructure for the Java Web API. It can be used to turn on or off logging in the API by severity of message to be logged.

Summary

Public Methods
static boolean getDebugMonitorStatus()
Returns true if logging to the platform-dependent debug monitor is active, false if it is not.
static boolean getErrorLogStatus()
Returns true if error logging is on, and false if it is not.
static String getLogFile()
Returns the filename of the logfile that is currently set.
static int getPerformanceLogStatus()
Returns the current status of performance logging.
static boolean getTraceLogStatus()
Returns true if trace logging is on, and false if it is not.
static boolean getWarningLogStatus()
Returns true if warning logging is on, and false if it is not.
static void logError(String componentInfo, String errorMsg)
Logs an error to the log file if logging is turned on for errors.
static void logPerformance(int _perfLogLevel, String componentInfo, String perfMsg)
Logs a performance message to the logfile if performance logging is turned on.
static void logTrace(String componentInfo, String traceMsg)
Logs a tracing message to the log file if tracing is turned on.
static void logWarning(String componentInfo, String warnMsg)
Logs a warning message to the logfile if it is turned on.
static void setAllLogging(boolean isOn)
Sets the logging for all events either on or off.
static void setDebugMonitor(boolean isOn)
Enables logging to a "debug monitor".
static void setErrorLog(boolean isOn)
Sets the logging setting for the logging of errors.
synchronized static void setLogFile(String fileName)
Sets the current log file to the filename specified and closes the previous logfile, if it was open.
static void setPerformanceLog(int perfLogLevel)
Sets the logging setting for the logging of performance data.
static void setTraceLog(boolean isOn)
Sets trace logging to either on or off.
static void setWarningLog(boolean isOn)
Sets warning logging to either on or off.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static boolean getDebugMonitorStatus ()

Returns true if logging to the platform-dependent debug monitor is active, false if it is not.

Returns
  • The status of debug monitor logging.

public static boolean getErrorLogStatus ()

Returns true if error logging is on, and false if it is not.

Returns
  • The status of error logging.

public static String getLogFile ()

Returns the filename of the logfile that is currently set. Returns null if no filename is set.

Returns
  • The filename currently set, or null if none is set.

public static int getPerformanceLogStatus ()

Returns the current status of performance logging.

Returns

public static boolean getTraceLogStatus ()

Returns true if trace logging is on, and false if it is not.

Returns
  • The status of trace logging.

public static boolean getWarningLogStatus ()

Returns true if warning logging is on, and false if it is not.

Returns
  • The status of warning logging.

public static void logError (String componentInfo, String errorMsg)

Logs an error to the log file if logging is turned on for errors.

Parameters
componentInfo The name of the function/class that the error occurred in.
errorMsg The text of the error

public static void logPerformance (int _perfLogLevel, String componentInfo, String perfMsg)

Logs a performance message to the logfile if performance logging is turned on.

Parameters
_perfLogLevel The level of the message being logged, from EnumPerformanceLogLevel.
componentInfo The name of the function/class that the warning occurred in.
perfMsg The text of the performance message.

public static void logTrace (String componentInfo, String traceMsg)

Logs a tracing message to the log file if tracing is turned on.

Parameters
componentInfo The name of the function/class that the trace occurred in.
traceMsg The text of the trace.

public static void logWarning (String componentInfo, String warnMsg)

Logs a warning message to the logfile if it is turned on.

Parameters
componentInfo The name of the function/class that the warning occurred in.
warnMsg The text of the warning

public static void setAllLogging (boolean isOn)

Sets the logging for all events either on or off.

Parameters
isOn true if logging for all events should be on, false if it should be off.

public static void setDebugMonitor (boolean isOn)

Enables logging to a "debug monitor". This will vary from platform to platform, but for Windows NT this will be the Debug Monitor which traps calls to the Win32 API: OutputDebugString. Creation date: (9/20/00 4:00:05 PM)

Parameters
isOn if true, output for tracing, error, etc should be directed to a debug monitor.

public static void setErrorLog (boolean isOn)

Sets the logging setting for the logging of errors.

Parameters
isOn true if error logging should be on, false if it should be turned off.

public static synchronized void setLogFile (String fileName)

Sets the current log file to the filename specified and closes the previous logfile, if it was open.

Parameters
fileName The fileName (with path if necessary) to use for logging.

public static void setPerformanceLog (int perfLogLevel)

Sets the logging setting for the logging of performance data.

Parameters
perfLogLevel true if performance logging should be on, false if it should be turned off.

public static void setTraceLog (boolean isOn)

Sets trace logging to either on or off.

Parameters
isOn true if trace logging should be turned on, false if it should be turned off.

public static void setWarningLog (boolean isOn)

Sets warning logging to either on or off.

Parameters
isOn true if warning logging should be turned on, false if it should be turned off.