Interface DiagnosticsBean

    • Field Detail

      • DIAGNOSTICS_TYPE_NOT_INITIALIZED

        static final int DIAGNOSTICS_TYPE_NOT_INITIALIZED
        Value that specifies the integer property has not yet been initialized
        See Also:
        Constant Field Values
      • DIAGNOSTICS_TYPE_DEFAULT

        static final int DIAGNOSTICS_TYPE_DEFAULT
        Value that specifies the type of diagnostics to apply is the default one
        See Also:
        Constant Field Values
      • DIAGNOSTICS_TYPE_CUSTOM

        static final int DIAGNOSTICS_TYPE_CUSTOM
        Value that specifies the type of diagnostics to apply is a custom one
        See Also:
        Constant Field Values
      • DIAGNOSTICS_TYPE_STATISTICS

        static final int DIAGNOSTICS_TYPE_STATISTICS
        Value that specifies that statistics is the type of diagnostics to apply.
        See Also:
        Constant Field Values
      • SORT_BY_TIMESTAMP_DESCENDING

        static final int SORT_BY_TIMESTAMP_DESCENDING
        Indicates sorting order timestamp descending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_TIMESTAMP_ASCENDING

        static final int SORT_BY_TIMESTAMP_ASCENDING
        Indicates sorting order timestamp ascending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_LEVEL_DESCENDING

        static final int SORT_BY_LEVEL_DESCENDING
        Indicates sorting order level (severity) descending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_LEVEL_ASCENDING

        static final int SORT_BY_LEVEL_ASCENDING
        Indicates sorting order level (severity) ascending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_USER_NAME_DESCENDING

        static final int SORT_BY_USER_NAME_DESCENDING
        Indicates sorting order user name descending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_USER_NAME_ASCENDING

        static final int SORT_BY_USER_NAME_ASCENDING
        Indicates sorting order user name ascending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_USER_IP_DESCENDING

        static final int SORT_BY_USER_IP_DESCENDING
        Indicates sorting order user ip ascending when showing log contents
        See Also:
        Constant Field Values
      • SORT_BY_USER_IP_ASCENDING

        static final int SORT_BY_USER_IP_ASCENDING
        Indicates sorting order user ip ascending when showing log contents
        See Also:
        Constant Field Values
      • LOCAL_SHOW_ERRORS

        static final int LOCAL_SHOW_ERRORS
        Local flag that represents the display mode: show errors
        See Also:
        Constant Field Values
      • LOCAL_SHOW_MESSAGES

        static final int LOCAL_SHOW_MESSAGES
        Local flag that represents the display mode: show message
        See Also:
        Constant Field Values
      • LOCAL_SHOW_WARNINGS

        static final int LOCAL_SHOW_WARNINGS
        Local flag that represents the display mode: show warnings
        See Also:
        Constant Field Values
      • STATE_SHOW_CONFIGURATION

        static final int STATE_SHOW_CONFIGURATION
        Indicates the current state of the bean is showing the log configuration interface
        See Also:
        Constant Field Values
      • STATE_SHOW_LOGS

        static final int STATE_SHOW_LOGS
        Indicates the current state of the bean is showing the log contents
        See Also:
        Constant Field Values
      • STATE_SHOW_STATISTICS

        static final int STATE_SHOW_STATISTICS
        Indicates the current state of the bean is showing the statistic logging settings
        See Also:
        Constant Field Values
      • PATTERN_PROPERTY_NAME

        static final java.lang.String PATTERN_PROPERTY_NAME
        String that represents the property on the diagnostics configuration file corresponding to the location of the target log file
        See Also:
        Constant Field Values
      • LEVEL_PROPERTY_NAME

        static final java.lang.String LEVEL_PROPERTY_NAME
        String that represents the property on the diagnostics configuration file corresponding to the level of logging detail
        See Also:
        Constant Field Values
      • DIAGNOSTICS_CONFIG_DEFAULT_FILE

        static final java.lang.String DIAGNOSTICS_CONFIG_DEFAULT_FILE
        String that represents the name of the diagnostics configuration file
        See Also:
        Constant Field Values
      • LOG_DEFAULT_FILE_PREFIX

        static final java.lang.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
        See Also:
        Constant Field Values
      • LOG_DEFAULT_FILE_SUFFIX

        static final java.lang.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
        See Also:
        Constant Field Values
      • ADVANCED_LOGGER_HANDLER

        static final java.lang.String ADVANCED_LOGGER_HANDLER
        String that represents the name of an advanced handler. Creates on the advanced options section of the Diagnostics configuration page
        Since:
        MicroStrategy Web 8.0.2
        See Also:
        Constant Field Values
      • ADVANCED_LOGGER_CONSOLE_HANDLER

        static final java.lang.String ADVANCED_LOGGER_CONSOLE_HANDLER
        Since:
        MicroStrategy Web 8.1.1
        See Also:
        Constant Field Values
      • DEFAULT_LOGGER_NAME

        static final java.lang.String DEFAULT_LOGGER_NAME
        String that represents the name of a default logger
        Since:
        MicroStrategy Web 8.0.2
        See Also:
        Constant Field Values
      • LIMIT_PROPERTY_NAME

        static final java.lang.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
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • COUNT_PROPERTY_NAME

        static final java.lang.String COUNT_PROPERTY_NAME
        String that represents the property on the diagnostics configuration file corresponding to how many output files to cycle through
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
    • Method Detail

      • getCurrentPage

        int getCurrentPage()
        Get the current page displayed when viewing the log file contents
        Returns:
        the page number currently viewed
      • setCurrentPage

        void setCurrentPage​(int page)
        Set the current page to display when viewing the log file contents
        Parameters:
        page - the page number to be viewed
      • getErrorField

        java.lang.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
      • setErrorField

        void setErrorField​(java.lang.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
      • isValidField

        boolean isValidField​(java.lang.String fieldName)
      • addValidationFailure

        void addValidationFailure​(java.lang.String fieldName,
                                  java.lang.String value)
      • getValidationFailureValue

        java.lang.String getValidationFailureValue​(java.lang.String fieldName)
      • setShowState

        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
      • getShowState

        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
      • getDiagnosticType

        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
      • getDiagnosticLevel

        java.lang.String getDiagnosticLevel()
        Deprecated.
        the level can be obtained from EditableLogger.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.
      • getLogFileFolder

        java.lang.String getLogFileFolder()
        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
      • getDefaultDiagnosticsFileLocation

        java.lang.String getDefaultDiagnosticsFileLocation()
        Get the path and file used as the default configuration file properties
        Returns:
        a String with the path and file used
        Since:
        MicroStrategy Web 7.5.1
      • getDefaultDiagnosticsFileLocation

        java.lang.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
        Since:
        MicroStrategy Web 7.5.1
      • getCustomDiagnosticsFileLocation

        java.lang.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
      • getStatisticsFileLocation

        java.lang.String getStatisticsFileLocation()
        Get the path and file used as statistics file, other than the default
        Returns:
        a String with the path and file used
      • getStatisticsMode

        java.lang.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.
      • setFromDay

        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
      • getFromDay

        int getFromDay()
        Get the starting day to be considered when displaying log file contents
        Returns:
        day number of the day when to start
      • setFromYear

        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
      • getFromYear

        int getFromYear()
        Get the starting year to be considered when displaying log file contents
        Returns:
        year number of the year when to start
      • setFromMonth

        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
      • getFromMonth

        int getFromMonth()
        Get the starting month to be considered when displaying log file contents
        Returns:
        month number of the month when to start
      • setToDay

        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
      • getToDay

        int getToDay()
        Get the ending day to be considered when displaying log file contents
        Returns:
        day number of the day when to finish
      • setToYear

        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
      • getToYear

        int getToYear()
        Get the ending year to be considered when displaying log file contents
        Returns:
        year number of the year when to finish
      • setToMonth

        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
      • getToMonth

        int getToMonth()
        Get the ending month to be considered when displaying log file contents
        Returns:
        month number of the month when to finish
      • setDisplayFlag

        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
      • getDisplayFlag

        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
      • setSort

        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
      • getSort

        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
      • setDiagnosticType

        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
      • setDiagnosticLevel

        void setDiagnosticLevel​(java.lang.String diagnosticLevel)
        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
      • setLogFileFolder

        void setLogFileFolder​(java.lang.String filePath)
        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
      • setCustomDiagnosticsFileLocation

        void setCustomDiagnosticsFileLocation​(java.lang.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
      • setStatisticsFileLocation

        void setStatisticsFileLocation​(java.lang.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
      • setStatisticsMode

        void setStatisticsMode​(java.lang.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.
      • getAdvancedLoggerNames

        java.util.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
        Since:
        MicroStrategy Web 8.0.2
      • getDefaultLogger

        EditableLogger getDefaultLogger()
        Returns:
        an EditableLogger linked to the default logger. The default logger is determined by having the name: DiagnosticsBean.DEFAULT_LOGGER_NAME
        Since:
        MicroStrategy Web 8.0.2
      • getAdvancedLogger

        EditableLogger getAdvancedLogger​(java.lang.String name)
        Returns:
        an EditableLogger which is liked to a Logger specified Adds a Handler with the name: DiagnosticsBean.ADVANCED_LOGGER_HANDLER
        Since:
        MicroStrategy Web 8.0.2