com.atlassian.confluence.admin.actions
Class ConfigureLog4jAction
java.lang.Object
com.opensymphony.xwork.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.admin.actions.ConfigureLog4jAction
- All Implemented Interfaces:
- WebInterface, MessageHolderAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, java.io.Serializable
public class ConfigureLog4jAction
- extends ConfluenceActionSupport
Allows runtime configuration of Log4j. This class has several entry points:
- execute: used whilst viewing the
page
- save: invoked for performing updates to the list of Loggers
- add: invoked when adding a new
Logger
- add: called when removing a Logger
There are additionally several Hibernate logging related entry
points that possibly should be refactored out.
This class possibly has too much responsibility at this point, and possibly needs refactoring.
It is possible that synchronization errors could occur as the result of switching log levels as a log statement is
being generated.
TODO: put the logic here into a service or manager layer -- it shouldn't be in an action.
- See Also:
- Serialized Form
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, pluginAccessor, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager |
Fields inherited from class com.opensymphony.xwork.ActionSupport |
LOG |
Fields inherited from interface com.opensymphony.xwork.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getCancel, getCancelResult, getContext, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserByName, getUserFullName, getUserInterfaceState, getUserProfilePicUrl, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, setBootstrapManager, setCancel, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionCheck, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setSystemInformationService, setUserAccessor, setWebInterfaceManager |
Methods inherited from class com.opensymphony.xwork.ActionSupport |
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigureLog4jAction
public ConfigureLog4jAction()
execute
public java.lang.String execute()
- Specified by:
execute
in interface com.opensymphony.xwork.Action
- Overrides:
execute
in class com.opensymphony.xwork.ActionSupport
changeProfiling
public java.lang.String changeProfiling()
setToDeleteName
public void setToDeleteName(java.lang.String toDeleteName)
setProfilingOn
public void setProfilingOn(boolean buttonValue)
getLevelTypes
public java.util.List<java.lang.String> getLevelTypes()
delete
public java.lang.String delete()
save
public java.lang.String save()
add
public java.lang.String add()
- Add a new entry to the Log4j Configuration.
- Returns:
- action result
getEntries
public java.util.List getEntries()
setEntries
public void setEntries(java.util.List<ConfigureLog4jAction.LoggingConfigEntry> entries)
setClassNames
public void setClassNames(java.lang.String[] classNames)
setLevelNames
public void setLevelNames(java.lang.String[] levelNames)
setExtraClassName
public void setExtraClassName(java.lang.String extraClassName)
setExtraLevelName
public void setExtraLevelName(java.lang.String extraLevelName)
turnOnHibernateLogging
public java.lang.String turnOnHibernateLogging()
- Turns on Hibernate Logging (both SQL and types will now be output).
- Returns:
- action result
turnOffHibernateLogging
public java.lang.String turnOffHibernateLogging()
- Turns off Hibernate Logging (SQL will not be output).
- Returns:
- action result
isHibernateLoggingEnabled
public boolean isHibernateLoggingEnabled()
setProfileName
public void setProfileName(java.lang.String profileName)
changeProfile
public java.lang.String changeProfile()
isProfilingEnabled
public boolean isProfilingEnabled()
isPermitted
public boolean isPermitted()
- Overrides:
isPermitted
in class ConfluenceActionSupport
Copyright © 2003-2014 Atlassian. All Rights Reserved.