com.atlassian.confluence.admin.actions
Class ConfigureLog4jAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.confluence.core.ConfluenceActionSupport
          extended by 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, java.io.Serializable

public class ConfigureLog4jAction
extends ConfluenceActionSupport

Allows runtime configuration of Log4j. This class has several entry points:

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.

See Also:
Serialized Form

Nested Class Summary
static class ConfigureLog4jAction.LoggingConfigEntry
          Represents a Log4j Config entry, corresponding to a Class or Package mapped to a Level.
 
Field Summary
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, permissionManager, permitted, 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
 
Constructor Summary
ConfigureLog4jAction()
           
 
Method Summary
 java.lang.String add()
          Add a new entry to the Log4j Configuration.
 java.lang.String changeProfile()
           
 java.lang.String delete()
           
 java.lang.String execute()
           
 java.util.List getEntries()
           
 java.util.List getLevelTypes()
           
 boolean isHibernateLoggingEnabled()
           
 boolean isPermitted()
           
 boolean isProfilingEnabled()
           
 java.lang.String save()
           
 void setClassNames(java.lang.String[] classNames)
           
 void setEntries(java.util.List entries)
           
 void setExtraClassName(java.lang.String extraClassName)
           
 void setExtraLevelName(java.lang.String extraLevelName)
           
 void setLevelNames(java.lang.String[] levelNames)
           
 void setProfileName(java.lang.String profileName)
           
 void setToDeleteName(java.lang.String toDeleteName)
           
 java.lang.String turnOffHibernateLogging()
          Turns off Hibernate Logging (SQL will not be output).
 java.lang.String turnOnHibernateLogging()
          Turns on Hibernate Logging (both SQL and types will now be output).
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEventManager, getFriendlyDateFormatter, getGlobalHelper, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, 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
 

Constructor Detail

ConfigureLog4jAction

public ConfigureLog4jAction()
Method Detail

setToDeleteName

public void setToDeleteName(java.lang.String toDeleteName)

execute

public java.lang.String execute()
Specified by:
execute in interface com.opensymphony.xwork.Action
Overrides:
execute in class com.opensymphony.xwork.ActionSupport

getLevelTypes

public java.util.List 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 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-2008 Atlassian Pty Ltd. All Rights Reserved.