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, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, 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, 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, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getActionName, getBootstrapManager, getCancelResult, getContext, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, 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, 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 String execute()
- Specified by:
execute
in interface com.opensymphony.xwork.Action
- Overrides:
execute
in class com.opensymphony.xwork.ActionSupport
changeProfiling
public String changeProfiling()
setToDeleteName
public void setToDeleteName(String toDeleteName)
setProfilingOn
public void setProfilingOn(boolean buttonValue)
getLevelTypes
public List<String> getLevelTypes()
delete
public String delete()
save
public String save()
add
public String add()
- Add a new entry to the Log4j Configuration.
- Returns:
- action result
getEntries
public List getEntries()
setEntries
public void setEntries(List<ConfigureLog4jAction.LoggingConfigEntry> entries)
setClassNames
public void setClassNames(String[] classNames)
setLevelNames
public void setLevelNames(String[] levelNames)
setExtraClassName
public void setExtraClassName(String extraClassName)
setExtraLevelName
public void setExtraLevelName(String extraLevelName)
turnOnHibernateLogging
public String turnOnHibernateLogging()
- Turns on Hibernate Logging (both SQL and types will now be output).
- Returns:
- action result
turnOffHibernateLogging
public String turnOffHibernateLogging()
- Turns off Hibernate Logging (SQL will not be output).
- Returns:
- action result
isHibernateLoggingEnabled
public boolean isHibernateLoggingEnabled()
setProfileName
public void setProfileName(String profileName)
changeProfile
public String changeProfile()
isProfilingEnabled
public boolean isProfilingEnabled()
isPermitted
public boolean isPermitted()
- Overrides:
isPermitted
in class ConfluenceActionSupport