public interface

DiagnosticsBean

implements AppComponent RequestPersistable
com.microstrategy.web.admin.beans.DiagnosticsBean

Class Overview

Title: DiagnosticsBean. This bean provides the methods required for displaying and modifying information related with the log processing and handling on the application.

Summary

Constants
String ADVANCED_LOGGER_CONSOLE_HANDLER
String ADVANCED_LOGGER_HANDLER String that represents the name of an advanced handler.
String ADVANCED_LOGGER_JAVA_CONSOLE_HANDLER
String COUNT_PROPERTY_NAME String that represents the property on the diagnostics configuration file corresponding to how many output files to cycle through
String DEFAULT_LOGGER_NAME String that represents the name of a default logger
String DIAGNOSTICS_CONFIG_DEFAULT_FILE String that represents the name of the diagnostics configuration file
int DIAGNOSTICS_TYPE_CUSTOM Value that specifies the type of diagnostics to apply is a custom one
int DIAGNOSTICS_TYPE_DEFAULT Value that specifies the type of diagnostics to apply is the default one
int DIAGNOSTICS_TYPE_NOT_INITIALIZED Value that specifies the integer property has not yet been initialized
int DIAGNOSTICS_TYPE_STATISTICS Value that specifies that statistics is the type of diagnostics to apply.
String LEVEL_PROPERTY_NAME String that represents the property on the diagnostics configuration file corresponding to the level of logging detail
String LIMIT_PROPERTY_NAME String that represents the property on the diagnostics configuration file corresponding to the maximum amount to write to any one file
int LOCAL_SHOW_ERRORS Local flag that represents the display mode: show errors
int LOCAL_SHOW_MESSAGES Local flag that represents the display mode: show message
int LOCAL_SHOW_WARNINGS Local flag that represents the display mode: show warnings
String LOG_DEFAULT_FILE_PREFIX String that represents the property on the diagnostics configuration file corresponding to the name prefix for the logging file to generate
String LOG_DEFAULT_FILE_SUFFIX String that represents the property on the diagnostics configuration file corresponding to the name extension for the logging file to generate
String PATTERN_PROPERTY_NAME String that represents the property on the diagnostics configuration file corresponding to the location of the target log file
int SORT_BY_LEVEL_ASCENDING Indicates sorting order level (severity) ascending when showing log contents
int SORT_BY_LEVEL_DESCENDING Indicates sorting order level (severity) descending when showing log contents
int SORT_BY_TIMESTAMP_ASCENDING Indicates sorting order timestamp ascending when showing log contents
int SORT_BY_TIMESTAMP_DESCENDING Indicates sorting order timestamp descending when showing log contents
int SORT_BY_USER_IP_ASCENDING Indicates sorting order user ip ascending when showing log contents
int SORT_BY_USER_IP_DESCENDING Indicates sorting order user ip ascending when showing log contents
int SORT_BY_USER_NAME_ASCENDING Indicates sorting order user name ascending when showing log contents
int SORT_BY_USER_NAME_DESCENDING Indicates sorting order user name descending when showing log contents
int STATE_SHOW_CONFIGURATION Indicates the current state of the bean is showing the log configuration interface
int STATE_SHOW_LOGS Indicates the current state of the bean is showing the log contents
int STATE_SHOW_STATISTICS Indicates the current state of the bean is showing the statistic logging settings
[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
From interface com.microstrategy.web.app.beans.AppComponent
Public Methods
abstract void addValidationFailure(String fieldName, String value)
abstract EditableLogger getAdvancedLogger(String name)
abstract List getAdvancedLoggerNames()
abstract int getCurrentPage()
Get the current page displayed when viewing the log file contents
abstract String getCustomDiagnosticsFileLocation()
Get the path and file used as configuration file properties, other than the default
abstract String getDefaultDiagnosticsFileLocation(boolean populate)
Get the path and file used as the default configuration file properties
abstract String getDefaultDiagnosticsFileLocation()
Get the path and file used as the default configuration file properties
abstract EditableLogger getDefaultLogger()
abstract String getDiagnosticLevel()
This method is deprecated. the level can be obtained from getLevel()
abstract int getDiagnosticType()
Get the diagnostic type that the bean has as selected
abstract int getDisplayFlag()
Get the flag to be used for defining which types of messages to display
abstract String getErrorField()
Obtain the error field that generated an error with the user's input
abstract int getFromDay()
Get the starting day to be considered when displaying log file contents
abstract int getFromMonth()
Get the starting month to be considered when displaying log file contents
abstract int getFromYear()
Get the starting year to be considered when displaying log file contents
abstract String getLogFileFolder()
This method is deprecated. the folder can be obtained from the default logger and then read the property: getDefaultLogger().getProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME)
abstract int getShowState()
Get the state of the bean, that indicates the information that will be/is displayed to the user
abstract int getSort()
Get the sorting order to use when showing log file contents
abstract String getStatisticsFileLocation()
Get the path and file used as statistics file, other than the default
abstract String getStatisticsMode()
Get the statistics level currently defined on the bean
abstract int getToDay()
Get the ending day to be considered when displaying log file contents
abstract int getToMonth()
Get the ending month to be considered when displaying log file contents
abstract int getToYear()
Get the ending year to be considered when displaying log file contents
abstract String getValidationFailureValue(String fieldName)
abstract boolean isValidField(String fieldName)
abstract void setCurrentPage(int page)
Set the current page to display when viewing the log file contents
abstract void setCustomDiagnosticsFileLocation(String fileLocation)
Set the path and file used as configuration file properties, other than the default
abstract void setDiagnosticLevel(String diagnosticLevel)
This method is deprecated. the level can be set directly to the default logger obtained from getDefaultLogger()
abstract void setDiagnosticType(int diagnosticType)
Set the diagnostic type that the bean has as selected
abstract void setDisplayFlag(int displayFlag)
Set the flag to be used for defining which types of messages to display
abstract void setErrorField(String fieldName)
Set the error field (event argument name) that generated an error with the user's input
abstract void setFromDay(int day)
Set the starting day to be considered when displaying log file contents
abstract void setFromMonth(int month)
Set the starting month to be considered when displaying log file contents
abstract void setFromYear(int year)
Set the starting year to be considered when displaying log file contents
abstract void setLogFileFolder(String filePath)
This method is deprecated. the folder can be set to the default logger: getDefaultLogger().setProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME, value)
abstract void setShowState(int state)
Set the state of the bean, to specify what information it should be displaying to the user.
abstract void setSort(int sort)
Set the sorting order to use when showing log file contents
abstract void setStatisticsFileLocation(String fileLocation)
Set the path and file used as configuration file properties, other than the default
abstract void setStatisticsMode(String mode)
Set the statistics level currently defined on the bean
abstract void setToDay(int day)
Set the ending day to be considered when displaying log file contents
abstract void setToMonth(int month)
Set the ending month to be considered when displaying log file contents
abstract void setToYear(int year)
Set the ending year to be considered when displaying log file contents
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.app.beans.AppComponent
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebComponent

Constants

public static final String ADVANCED_LOGGER_CONSOLE_HANDLER

Constant Value: "ConsoleHandler"

public static final String ADVANCED_LOGGER_HANDLER

String that represents the name of an advanced handler. Creates on the advanced options section of the Diagnostics configuration page

Constant Value: "AdvancedLoggerHandler"

public static final String ADVANCED_LOGGER_JAVA_CONSOLE_HANDLER

Constant Value: "JavaConsoleHandler"

public static final String COUNT_PROPERTY_NAME

String that represents the property on the diagnostics configuration file corresponding to how many output files to cycle through

Constant Value: "fileH.count"

public static final String DEFAULT_LOGGER_NAME

String that represents the name of a default logger

Constant Value: ""

public static final String DIAGNOSTICS_CONFIG_DEFAULT_FILE

String that represents the name of the diagnostics configuration file

Constant Value: "logger.properties"

public static final int DIAGNOSTICS_TYPE_CUSTOM

Value that specifies the type of diagnostics to apply is a custom one

Constant Value: 1 (0x00000001)

public static final int DIAGNOSTICS_TYPE_DEFAULT

Value that specifies the type of diagnostics to apply is the default one

Constant Value: 0 (0x00000000)

public static final int DIAGNOSTICS_TYPE_NOT_INITIALIZED

Value that specifies the integer property has not yet been initialized

Constant Value: -9999 (0xffffd8f1)

public static final int DIAGNOSTICS_TYPE_STATISTICS

Value that specifies that statistics is the type of diagnostics to apply.

Constant Value: 2 (0x00000002)

public static final String LEVEL_PROPERTY_NAME

String that represents the property on the diagnostics configuration file corresponding to the level of logging detail

Constant Value: "level"

public static final String LIMIT_PROPERTY_NAME

String that represents the property on the diagnostics configuration file corresponding to the maximum amount to write to any one file

Constant Value: "fileH.limit"

public static final int LOCAL_SHOW_ERRORS

Local flag that represents the display mode: show errors

Constant Value: 1 (0x00000001)

public static final int LOCAL_SHOW_MESSAGES

Local flag that represents the display mode: show message

Constant Value: 2 (0x00000002)

public static final int LOCAL_SHOW_WARNINGS

Local flag that represents the display mode: show warnings

Constant Value: 4 (0x00000004)

public static final String LOG_DEFAULT_FILE_PREFIX

String that represents the property on the diagnostics configuration file corresponding to the name prefix for the logging file to generate

Constant Value: "MSTRLog"

public static final String LOG_DEFAULT_FILE_SUFFIX

String that represents the property on the diagnostics configuration file corresponding to the name extension for the logging file to generate

Constant Value: "_1.log"

public static final String PATTERN_PROPERTY_NAME

String that represents the property on the diagnostics configuration file corresponding to the location of the target log file

Constant Value: "fileH.pattern"

public static final int SORT_BY_LEVEL_ASCENDING

Indicates sorting order level (severity) ascending when showing log contents

Constant Value: 4 (0x00000004)

public static final int SORT_BY_LEVEL_DESCENDING

Indicates sorting order level (severity) descending when showing log contents

Constant Value: 2 (0x00000002)

public static final int SORT_BY_TIMESTAMP_ASCENDING

Indicates sorting order timestamp ascending when showing log contents

Constant Value: 1 (0x00000001)

public static final int SORT_BY_TIMESTAMP_DESCENDING

Indicates sorting order timestamp descending when showing log contents

Constant Value: 0 (0x00000000)

public static final int SORT_BY_USER_IP_ASCENDING

Indicates sorting order user ip ascending when showing log contents

Constant Value: 64 (0x00000040)

public static final int SORT_BY_USER_IP_DESCENDING

Indicates sorting order user ip ascending when showing log contents

Constant Value: 32 (0x00000020)

public static final int SORT_BY_USER_NAME_ASCENDING

Indicates sorting order user name ascending when showing log contents

Constant Value: 16 (0x00000010)

public static final int SORT_BY_USER_NAME_DESCENDING

Indicates sorting order user name descending when showing log contents

Constant Value: 8 (0x00000008)

public static final int STATE_SHOW_CONFIGURATION

Indicates the current state of the bean is showing the log configuration interface

Constant Value: 0 (0x00000000)

public static final int STATE_SHOW_LOGS

Indicates the current state of the bean is showing the log contents

Constant Value: 1 (0x00000001)

public static final int STATE_SHOW_STATISTICS

Indicates the current state of the bean is showing the statistic logging settings

Constant Value: 2 (0x00000002)

Public Methods

public abstract void addValidationFailure (String fieldName, String value)

public abstract EditableLogger getAdvancedLogger (String name)

Returns
  • an EditableLogger which is liked to a Logger specified Adds a Handler with the name: DiagnosticsBean.ADVANCED_LOGGER_HANDLER

public abstract List getAdvancedLoggerNames ()

Returns
  • a List with the names of the advanced loggers. An advanced logger is determined by having a Handler with name: DiagnosticsBean.ADVANCED_LOGGER_HANDLER

public abstract int getCurrentPage ()

Get the current page displayed when viewing the log file contents

Returns
  • the page number currently viewed

public abstract String getCustomDiagnosticsFileLocation ()

Get the path and file used as configuration file properties, other than the default

Returns
  • a String with the path and file used

public abstract String getDefaultDiagnosticsFileLocation (boolean populate)

Get the path and file used as the default configuration file properties

Parameters
populate if True and the value is not yet available, it will execute the logic for obtaining it. Otherwise, it will return the value available (null if not found or not initialized yet)
Returns
  • a String with the path and file used

public abstract String getDefaultDiagnosticsFileLocation ()

Get the path and file used as the default configuration file properties

Returns
  • a String with the path and file used

public abstract EditableLogger getDefaultLogger ()

Returns
  • an EditableLogger linked to the default logger. The default logger is determined by having the name: DiagnosticsBean.DEFAULT_LOGGER_NAME

public abstract String getDiagnosticLevel ()

This method is deprecated.
the level can be obtained from getLevel()

Get the diagnostic level that the bean (log configuration file) has as selected

Returns
  • a String value representing the level of logging, like Severe, All, Fine, etc.

public abstract int getDiagnosticType ()

Get the diagnostic type that the bean has as selected

Returns
  • the type of diagnostic that is being used: DIAGNOSTICS_TYPE_DEFAULT or DIAGNOSTICS_TYPE_CUSTOM

public abstract int getDisplayFlag ()

Get the flag to be used for defining which types of messages to display

Returns
  • a binary value, combination of the LOCAL_SHOW (errors, messages, warnings) constants

public abstract String getErrorField ()

Obtain the error field that generated an error with the user's input

Returns
  • the field of the bean event that was not correctly populated and generated an error

public abstract int getFromDay ()

Get the starting day to be considered when displaying log file contents

Returns
  • day number of the day when to start

public abstract int getFromMonth ()

Get the starting month to be considered when displaying log file contents

Returns
  • month number of the month when to start

public abstract int getFromYear ()

Get the starting year to be considered when displaying log file contents

Returns
  • year number of the year when to start

public abstract String getLogFileFolder ()

This method is deprecated.
the folder can be obtained from the default logger and then read the property: getDefaultLogger().getProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME)

Get the path of the log file folder that the bean (log configuration file) has as selected

Returns
  • a String with the path information

public abstract int getShowState ()

Get the state of the bean, that indicates the information that will be/is displayed to the user

Returns
  • an int value that could be STATE_SHOW_CONFIGURATION, STATE_SHOW_LOGS or STATE_SHOW_STATISTICS

public abstract int getSort ()

Get the sorting order to use when showing log file contents

Returns
  • an integer value coming from one of the SORT_BY_LEVEL, SORT_BY_USER_NAME or SORT_BY_TIMESTAMP constants. Defaults to SORT_BY_TIMESTAMP_DESCENDING

public abstract String getStatisticsFileLocation ()

Get the path and file used as statistics file, other than the default

Returns
  • a String with the path and file used

public abstract String getStatisticsMode ()

Get the statistics level currently defined on the bean

Returns
  • a String value representing the statistics mode defined, corresponding to the int constants defined on StatsHandlerSupport.

public abstract int getToDay ()

Get the ending day to be considered when displaying log file contents

Returns
  • day number of the day when to finish

public abstract int getToMonth ()

Get the ending month to be considered when displaying log file contents

Returns
  • month number of the month when to finish

public abstract int getToYear ()

Get the ending year to be considered when displaying log file contents

Returns
  • year number of the year when to finish

public abstract String getValidationFailureValue (String fieldName)

public abstract boolean isValidField (String fieldName)

public abstract void setCurrentPage (int page)

Set the current page to display when viewing the log file contents

Parameters
page the page number to be viewed

public abstract void setCustomDiagnosticsFileLocation (String fileLocation)

Set the path and file used as configuration file properties, other than the default

Parameters
fileLocation a String with the path and file used

public abstract void setDiagnosticLevel (String diagnosticLevel)

This method is deprecated.
the level can be set directly to the default logger obtained from getDefaultLogger()

Set the diagnostic level that the bean (log configuration file) has as selected

Parameters
diagnosticLevel a String value representing the level of logging

public abstract void setDiagnosticType (int diagnosticType)

Set the diagnostic type that the bean has as selected

Parameters
diagnosticType the type of diagnostic that is being used: DIAGNOSTICS_TYPE_DEFAULT or DIAGNOSTICS_TYPE_CUSTOM

public abstract void setDisplayFlag (int displayFlag)

Set the flag to be used for defining which types of messages to display

Parameters
displayFlag a binary value, combination of the LOCAL_SHOW (errors, messages, warnings) constants

public abstract void setErrorField (String fieldName)

Set the error field (event argument name) that generated an error with the user's input

Parameters
fieldName the field of the bean event that was not correctly populated and generated an error

public abstract void setFromDay (int day)

Set the starting day to be considered when displaying log file contents

Parameters
day number of the day when to start

public abstract void setFromMonth (int month)

Set the starting month to be considered when displaying log file contents

Parameters
month number of the month when to start

public abstract void setFromYear (int year)

Set the starting year to be considered when displaying log file contents

Parameters
year number of the year when to start

public abstract void setLogFileFolder (String filePath)

This method is deprecated.
the folder can be set to the default logger: getDefaultLogger().setProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME, value)

Set the path of the log file folder that the bean (log configuration file) has as selected

Parameters
filePath a String with the path information

public abstract void setShowState (int state)

Set the state of the bean, to specify what information it should be displaying to the user.

Parameters
state an int value that could be STATE_SHOW_CONFIGURATION, STATE_SHOW_LOGS or STATE_SHOW_STATISTICS

public abstract void setSort (int sort)

Set the sorting order to use when showing log file contents

Parameters
sort an integer value coming from one of the SORT_BY_LEVEL or SORT_BY_TIMESTAMP constants

public abstract void setStatisticsFileLocation (String fileLocation)

Set the path and file used as configuration file properties, other than the default

Parameters
fileLocation a String with the path and file used

public abstract void setStatisticsMode (String mode)

Set the statistics level currently defined on the bean

Parameters
mode a String value representing the statistics mode defined, corresponding to the int constants defined on StatsHandlerSupport.

public abstract void setToDay (int day)

Set the ending day to be considered when displaying log file contents

Parameters
day number of the day when to finish

public abstract void setToMonth (int month)

Set the ending month to be considered when displaying log file contents

Parameters
month number of the month when to finish

public abstract void setToYear (int year)

Set the ending year to be considered when displaying log file contents

Parameters
year number of the year when to finish