Class UpdateLoggingProfiling
java.lang.Object
org.apache.struts2.ActionSupport
com.atlassian.crowd.console.action.BaseAction
com.atlassian.crowd.console.action.options.UpdateLoggingProfiling
- All Implemented Interfaces:
Serializable,org.apache.struts2.action.Action,org.apache.struts2.interceptor.ValidationAware,org.apache.struts2.locale.LocaleProvider,org.apache.struts2.text.TextProvider,org.apache.struts2.Validateable
Allows configuration of logging and profiling. These could be split to separate classes (and actions), but not as long
as they're one page in the UI.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRepresents a Log4j Config entry, corresponding to a Class or Package mapped to a Level. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]TODO: levelNames[i] is the level name for class classNames[i].protected List<UpdateLoggingProfiling.LoggingConfigEntry> protected String[]Fields inherited from class com.atlassian.crowd.console.action.BaseAction
actionHelper, actionMessageAlertColor, ALERT_BLUE, ALERT_GREEN, ALERT_RED, ALERT_YELLOW, applicationManager, applicationService, BASIC_AUTH_PLUGIN_KEY, BASIC_AUTH_SYS_PROP_DISABLED, clientProperties, clusterService, crowdLicenseManager, directoryManager, initialLoad, pluginPropertyManager, propertyManager, rememberMeService, SMALL_AVATAR_SIZE, smallAvatarUrl, tab, tokenAuthenticationManagerFields inherited from class org.apache.struts2.ActionSupport
containerFields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()booleanprotected voidReads current state of logging and updates class fields to match.protected voidUpdates the class profiling fields to reflect the current status of profiling.voidsetClassNames(String[] classNames) voidsetCrowdHomeLogAppenderSwitcher(CrowdHomeLogAppenderSwitcher crowdHomeLogAppenderSwitcher) voidsetCrowdLoggingConfiguration(CrowdLoggingConfiguration crowdLoggingConfiguration) voidvoidsetEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) protected voidsetLevelForLogger(String className, String levelName) voidsetLevelNames(String[] levelNames) voidsetProfileName(String profileName) voidsetProfilingOn(boolean profilingOn) protected booleanUpdates the logging rules upon a "submit" of the UI form by the user.protected booleanMethods inherited from class com.atlassian.crowd.console.action.BaseAction
addActionError, addActionMessage, applyFieldError, applyFieldErrors, applyValidationErrors, authorisedToAccessCrowdAdminConsole, authorisedToAccessCrowdConsole, bindInformationAboutLicense, containsActionMessages, containsErrorMessages, directory, findAvatarUrl, getActionMessageAlertColor, getBootstrapManager, getCrowdApplication, getCurrentLicenseResourceTotal, getDisplayableLink, getHttpRequest, getImageLocation, getImageTitle, getLabel, getLicense, getLink, getLocaleProvider, getPasswordComplexityMessage, getPrincipalName, getRemoteUser, getSession, getSitemeshPageProperties, getSmallAvatarUrl, getTab, getText, getText, getTextProvider, getUserName, getWebFragmentsContextMap, getWebInterfaceManager, getWebItemsForSection, getWebResourceManager, getWebSectionsForLocation, getXsrfToken, getXsrfTokenName, isAtResourceLimit, isAuthenticated, isBasicAuthEnabled, isDataCenterLicense, isEvaluation, isGroupAdmin, isInitialLoad, isLicenseExpired, isLicenseForged, isRestartRequiredToEnableClustering, isSubscription, isSysAdmin, isWithinGracePeriod, renderFreemarkerTemplate, resolveAvatarUri, setActionHelper, setApplicationManager, setApplicationService, setClientProperties, setClusterService, setCrowdApplication, setCrowdLicenseManager, setDirectoryManager, setPluginPropertyManager, setPropertyManager, setRememberMeService, setTab, setTokenAuthenticationManager, setWebInterfaceManager, setWebResourceManager, setXsrfTokenGeneratorMethods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
-
Field Details
-
classNames
TODO: levelNames[i] is the level name for class classNames[i]. Should look for a better way. -
levelNames
-
entry
-
entries
-
-
Constructor Details
-
UpdateLoggingProfiling
public UpdateLoggingProfiling()
-
-
Method Details
-
execute
- Specified by:
executein interfaceorg.apache.struts2.action.Action- Overrides:
executein classBaseAction
-
updateLogging
-
updateProfiling
-
processLogging
protected void processLogging()Reads current state of logging and updates class fields to match. -
tryUpdateLogging
protected boolean tryUpdateLogging()Updates the logging rules upon a "submit" of the UI form by the user.- Returns:
- true if successful, false otherwise.
-
setLevelForLogger
-
processProfiling
protected void processProfiling()Updates the class profiling fields to reflect the current status of profiling. -
tryUpdateProfiling
protected boolean tryUpdateProfiling() -
getEntries
-
setEntries
-
setClassNames
-
setLevelNames
-
getProfileName
-
setProfileName
-
isProfilingOn
public boolean isProfilingOn() -
setProfilingOn
public void setProfilingOn(boolean profilingOn) -
getLoggingLevelOption
-
setCrowdLoggingConfiguration
-
setCrowdHomeLogAppenderSwitcher
public void setCrowdHomeLogAppenderSwitcher(CrowdHomeLogAppenderSwitcher crowdHomeLogAppenderSwitcher) -
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
-