Package hudson.logging
Class LogRecorderManager
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.logging.LogRecorderManager
-
- All Implemented Interfaces:
ModelObject,SearchableModelObject,SearchItem,ModelObjectWithChildren,org.kohsuke.stapler.StaplerProxy
public class LogRecorderManager extends AbstractModelObject implements ModelObjectWithChildren, org.kohsuke.stapler.StaplerProxy
Owner ofLogRecorders, bound to "/log".- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,LogRecorder>logRecordersDeprecated.usegetRecorders()insteadstatic booleanSKIP_PERMISSION_CHECKEscape hatch for StaplerProxy-based access control
-
Constructor Summary
Constructors Constructor Description LogRecorderManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FormValidationdoCheckNewName(String name)ModelObjectWithContextMenu.ContextMenudoChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)Generates the context menu to list up all the children.org.kohsuke.stapler.HttpResponsedoConfigLogger(String name, String level)Configure the logging level.org.kohsuke.stapler.HttpResponsedoNewLogRecorder(String name)Creates a new log recorder.voiddoRss(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)RSS feed for log entries.StringgetDisplayName()LogRecordergetDynamic(String token)LogRecordergetLogRecorder(String token)List<LogRecorder>getRecorders()StringgetSearchUrl()Returns the URL of this item relative to the parentSearchItem.ObjectgetTarget()static voidinit(Jenkins h)voidload()Loads the configuration from disk.voidsetRecorders(List<LogRecorder> recorders)-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Field Detail
-
logRecorders
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("2.323") public final transient Map<String,LogRecorder> logRecorders
Deprecated.usegetRecorders()insteadLogRecorders keyed by their LogRecorder.getName() name}.
-
SKIP_PERMISSION_CHECK
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean SKIP_PERMISSION_CHECK
Escape hatch for StaplerProxy-based access control
-
-
Method Detail
-
getRecorders
public List<LogRecorder> getRecorders()
-
setRecorders
@DataBoundSetter public void setRecorders(List<LogRecorder> recorders)
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceModelObject
-
getSearchUrl
public String getSearchUrl()
Description copied from interface:SearchItemReturns the URL of this item relative to the parentSearchItem.- Specified by:
getSearchUrlin interfaceSearchItem- Returns:
- URL like "foo" or "foo/bar". The path can end with '/'. The path that starts with '/' will be interpreted as the absolute path (within the context path of Jenkins.)
-
getDynamic
public LogRecorder getDynamic(String token)
-
getLogRecorder
public LogRecorder getLogRecorder(String token)
-
load
public void load() throws IOExceptionLoads the configuration from disk.- Throws:
IOException
-
doNewLogRecorder
public org.kohsuke.stapler.HttpResponse doNewLogRecorder(@QueryParameter String name)Creates a new log recorder.
-
doCheckNewName
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckNewName(@QueryParameter String name)
-
doChildrenContextMenu
public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws Exception
Description copied from interface:ModelObjectWithChildrenGenerates the context menu to list up all the children.- Specified by:
doChildrenContextMenuin interfaceModelObjectWithChildren- Throws:
Exception
-
doConfigLogger
public org.kohsuke.stapler.HttpResponse doConfigLogger(@QueryParameter String name, @QueryParameter String level)Configure the logging level.
-
doRss
public void doRss(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionRSS feed for log entries.- Throws:
IOExceptionjavax.servlet.ServletException
-
init
@Initializer(before=PLUGINS_PREPARED) public static void init(Jenkins h) throws IOException
- Throws:
IOException
-
getTarget
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Object getTarget()
- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
-
-