public class

ConfigureLog4jAction

extends ConfluenceActionSupport
java.lang.Object
   ↳ com.opensymphony.xwork.ActionSupport
     ↳ com.atlassian.confluence.core.ConfluenceActionSupport
       ↳ com.atlassian.confluence.admin.actions.ConfigureLog4jAction

Class Overview

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.

Summary

Nested Classes
class ConfigureLog4jAction.LoggingConfigEntry Represents a Log4j Config entry, corresponding to a Class or Package mapped to a Level. 
[Expand]
Inherited Constants
From class com.atlassian.confluence.core.ConfluenceActionSupport
From interface com.opensymphony.xwork.Action
[Expand]
Inherited Fields
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
Public Constructors
ConfigureLog4jAction()
Public Methods
String add()
Add a new entry to the Log4j Configuration.
String changeProfile()
String changeProfiling()
String delete()
String execute()
List getEntries()
List<String> getLevelTypes()
boolean isHibernateLoggingEnabled()
boolean isPermitted()
boolean isProfilingEnabled()
String save()
void setClassNames(String[] classNames)
void setEntries(List<ConfigureLog4jAction.LoggingConfigEntry> entries)
void setExtraClassName(String extraClassName)
void setExtraLevelName(String extraLevelName)
void setLevelNames(String[] levelNames)
void setProfileName(String profileName)
void setProfilingOn(boolean buttonValue)
void setToDeleteName(String toDeleteName)
String turnOffHibernateLogging()
Turns off Hibernate Logging (SQL will not be output).
String turnOnHibernateLogging()
Turns on Hibernate Logging (both SQL and types will now be output).
[Expand]
Inherited Methods
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
From class java.lang.Object
From interface com.atlassian.confluence.plugin.descriptor.web.WebInterface
From interface com.opensymphony.xwork.Action
From interface com.opensymphony.xwork.LocaleProvider
From interface com.opensymphony.xwork.TextProvider
From interface com.opensymphony.xwork.Validateable
From interface com.opensymphony.xwork.ValidationAware

Public Constructors

public ConfigureLog4jAction ()

Public Methods

public String add ()

Add a new entry to the Log4j Configuration.

Returns
  • action result

public String changeProfile ()

public String changeProfiling ()

public String delete ()

public String execute ()

public List getEntries ()

public List<String> getLevelTypes ()

public boolean isHibernateLoggingEnabled ()

public boolean isPermitted ()

public boolean isProfilingEnabled ()

public String save ()

public void setClassNames (String[] classNames)

public void setEntries (List<ConfigureLog4jAction.LoggingConfigEntry> entries)

public void setExtraClassName (String extraClassName)

public void setExtraLevelName (String extraLevelName)

public void setLevelNames (String[] levelNames)

public void setProfileName (String profileName)

public void setProfilingOn (boolean buttonValue)

public void setToDeleteName (String toDeleteName)

public String turnOffHibernateLogging ()

Turns off Hibernate Logging (SQL will not be output).

Returns
  • action result

public String turnOnHibernateLogging ()

Turns on Hibernate Logging (both SQL and types will now be output).

Returns
  • action result