org.xwiki.component.logging.Logger.debug()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.xwiki.component.logging.Logger.debug()方法的一些代码示例,展示了Logger.debug()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()方法的具体详情如下:
包路径:org.xwiki.component.logging.Logger
类名称:Logger
方法名:debug

Logger.debug介绍

暂无

代码示例

代码示例来源:origin: org.xwiki.platform/xwiki-core-extension-api

/**
 * {@inheritDoc}
 * 
 * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String)
 */
public void debug(String message)
{
  this.logger.debug(message);
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-extension-api

/**
 * {@inheritDoc}
 * 
 * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String, java.lang.Throwable)
 */
public void debug(String message, Throwable throwable)
{
  this.logger.debug(message, throwable);
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

/**
 * {@inheritDoc}
 * 
 * @see Initializable#initialize()
 */
public void initialize() throws InitializationException
{
  this.toolsContext = new VelocityContext();
  // Instantiate Velocity tools
  Properties properties = this.velocityConfiguration.getTools();
  if (properties != null) {
    for (Enumeration< ? > props = properties.propertyNames(); props.hasMoreElements();) {
      String key = props.nextElement().toString();
      String value = properties.getProperty(key);
      Object toolInstance;
      try {
        toolInstance = Class.forName(value).newInstance();
      } catch (Exception e) {
        throw new InitializationException("Failed to initialize tool [" + value + "]", e);
      }
      this.toolsContext.put(key, toolInstance);
      getLogger().debug("Setting tool [" + key + "] = [" + value + "]");
    }
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-model

/**
   * {@inheritDoc}
   * @see org.xwiki.model.ModelConfiguration#getDefaultReferenceValue(org.xwiki.model.EntityType)
   */
  public String getDefaultReferenceValue(EntityType type)
  {
    String name;
    try {
      // TODO: For the moment we only look in the XWiki properties file since otherwise looking into
      // Wiki, Space and User preferences cause some cyclic dependencies (we'll be able to do that when all
      // code has been migrated to use References instead of Strings).
      ConfigurationSource configuration =
        this.componentManager.lookup(ConfigurationSource.class, "xwikiproperties");
      name = configuration.getProperty(PREFIX + "reference.default." + type.toString().toLowerCase(),
        DEFAULT_VALUES.get(type));
    } catch (ComponentLookupException e) {
      // Failed to load the component, use default values
      getLogger().debug("Failed to load [" + ConfigurationSource.class.getName()
        + "]. Using default Model values", e);
      name = DEFAULT_VALUES.get(type);
    }

    return name;
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-observation-remote

/**
 * {@inheritDoc}
 * 
 * @see org.xwiki.observation.remote.NetworkAdapter#send(org.xwiki.observation.remote.RemoteEventData)
 */
public void send(RemoteEventData remoteEvent)
{
  getLogger().debug("Send JGroups remote event [" + remoteEvent + "]");
  Message message = new Message(null, null, remoteEvent);
  // Send message to jgroups channels
  for (Map.Entry<String, JChannel> entry : this.channels.entrySet()) {
    try {
      entry.getValue().send(message);
    } catch (Exception e) {
      getLogger().error("Fail to send message to the channel [" + entry.getKey() + "]", e);
    }
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

continue;
} catch (InvalidVelocityException e) {
  getLogger().debug("Not a valid variable at char [" + i + "]", e);

代码示例来源:origin: org.xwiki.platform/xwiki-core-xml

getLogger().debug(String.format("Unknown URI scheme [%s] for entity [%s]. "
  + "Assuming the entity is already resolved and looking for it in the file system.",
  uri.getScheme(), systemId));

代码示例来源:origin: org.xwiki.platform/xwiki-core-extension-api

public Extension resolve(ExtensionId extensionId) throws ResolveException
  {
    Extension artifact = null;

    for (ExtensionRepository repository : this.repositories.values()) {
      try {
        artifact = repository.resolve(extensionId);

        return artifact;
      } catch (ResolveException e) {
        getLogger().debug(
          "Could not find extension [" + extensionId + "] in repository [" + repository.getId() + "]");
      }
    }

    throw new ResolveException("Could not find extension [" + extensionId + "]");
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

break;
} catch (InvalidVelocityException e) {
  getLogger().debug("Not a valid velocity variable at char [" + i + "]", e);

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

/**
 * {@inheritDoc}
 * 
 * @see LogChute#log(int, String)
 */
public void log(int level, String message)
{
  switch (level) {
    case LogChute.WARN_ID:
      getLogger().warn(message);
      break;
    case LogChute.INFO_ID:
      // Velocity info messages are too verbose, just consider them as debug messages...
      getLogger().debug(message);
      break;
    case LogChute.DEBUG_ID:
      getLogger().debug(message);
      break;
    case LogChute.ERROR_ID:
      getLogger().error(message);
      break;
    default:
      getLogger().debug(message);
      break;
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

/**
 * {@inheritDoc}
 * 
 * @see LogChute#log(int, String, Throwable)
 */
public void log(int level, String message, Throwable throwable)
{
  switch (level) {
    case LogChute.WARN_ID:
      getLogger().warn(message, throwable);
      break;
    case LogChute.INFO_ID:
      // Velocity info messages are too verbose, just consider them as debug messages...
      getLogger().debug(message, throwable);
      break;
    case LogChute.DEBUG_ID:
      getLogger().debug(message, throwable);
      break;
    case LogChute.ERROR_ID:
      getLogger().error(message, throwable);
      break;
    default:
      getLogger().debug(message, throwable);
      break;
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-observation-remote

/**
 * {@inheritDoc}
 * 
 * @see org.jgroups.MessageListener#receive(org.jgroups.Message)
 */
public void receive(Message msg)
{
  if (this.address == null || !this.address.equals(msg.getSrc())) {
    RemoteEventData remoteEvent = (RemoteEventData) msg.getObject();
    getLogger().debug("Received JGroups remote event [" + remoteEvent + "]");
    getRemoteObservationManager().notify(remoteEvent);
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-macro-velocity

getLogger().debug("Not a valid velocity keyword at char [" + i + "]", e);

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-transformation-macro

/**
 * @return the macro with the highest priority for the passed syntax or null if no macro is found
 */
private MacroHolder getHighestPriorityMacro(Block rootBlock, Syntax syntax)
{
  List<MacroHolder> macroHolders = new ArrayList<MacroHolder>();
  // 1) Sort the macros by priority to find the highest priority macro to execute
  for (MacroBlock macroBlock : rootBlock.getChildrenByType(MacroBlock.class, true)) {
    try {
      Macro< ? > macro = this.macroManager.getMacro(new MacroId(macroBlock.getId(), syntax));
      macroHolders.add(new MacroHolder(macro, macroBlock));
    } catch (MacroLookupException e) {
      // Macro cannot be found. Generate an error message instead of the macro execution result.
      // TODO: make it internationalized
      generateError(macroBlock, "Unknown macro: " + macroBlock.getId(), "The \"" + macroBlock.getId()
        + "\" macro is not in the list of registered macros. Verify the "
        + "spelling or contact your administrator.");
      getLogger().debug("Failed to locate the [" + macroBlock.getId() + "] macro. Ignoring it.");
    }
  }
  // Sort the Macros by priority
  Collections.sort(macroHolders);
  return macroHolders.size() > 0 ? macroHolders.get(0) : null;
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

String value = velocityProperties.getProperty(key);
  getEngine().setProperty(key, value);
  getLogger().debug("Setting property [" + key + "] = [" + value + "]");
String value = properties.getProperty(key);
getEngine().setProperty(key, value);
getLogger().debug("Overriding property [" + key + "] = [" + value + "]");

代码示例来源:origin: org.xwiki.platform/xwiki-core-velocity

i = getMethodOrProperty(array, i, null, context);
} catch (InvalidVelocityException e) {
  getLogger().debug("Not a valid method at char [" + i + "]", e);
  break;

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

getLogger().debug(
  String.format("Incomplete macro definition in [%s], macro name is empty", documentReference));
getLogger().debug(
  String.format("Incomplete macro definition in [%s], macro description is empty", documentReference));
getLogger().debug(String.format("Incomplete macro definition in [%s], default macro category is empty",
  documentReference));
getLogger().debug(String.format(errorMsg, documentReference));
macroContentDescription = "Macro content";
    getLogger().debug(String.format(errorMessage, documentReference));

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

getLogger().debug(ex.getMessage(), ex);
} catch (WikiMacroException ex) {

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-transformation-macro

getLogger().debug("The [" + macroHolder.macroBlock.getId() + "] macro doesn't support inline mode.");
  return;
  getLogger().debug(
    "Invalid macro parameter for the [" + macroHolder.macroBlock.getId() + "] macro. Internal error: ["
      + e.getMessage() + "]");
getLogger().debug(
  "Failed to execute the [" + macroHolder.macroBlock.getId() + "]macro. Internal error ["
    + e.getMessage() + "]");

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

/**
 * {@inheritDoc}
 * 
 * @see com.xpn.xwiki.util.XWikiStubContextProvider#initialize(com.xpn.xwiki.XWikiContext)
 */
public void initialize(XWikiContext context)
{
  this.stubContext = (XWikiContext) context.clone();
  // We are sure the context request is a real servlet request
  // So we force the dummy request with the current host
  XWikiServletRequestStub dummy = new XWikiServletRequestStub();
  if (context.getRequest() != null) {
    dummy.setHost(context.getRequest().getHeader("x-forwarded-host"));
    dummy.setScheme(context.getRequest().getScheme());
  }
  XWikiServletRequest request = new XWikiServletRequest(dummy);
  this.stubContext.setRequest(request);
  this.stubContext.setCacheDuration(0);
  this.stubContext.setUser(null);
  this.stubContext.setLanguage(null);
  this.stubContext.setDatabase(context.getMainXWiki());
  this.stubContext.setDoc(new XWikiDocument());
  this.stubContext.flushClassCache();
  this.stubContext.flushArchiveCache();
  getLogger().debug("Stub context initialized.");
}

相关文章

微信公众号

最新文章

更多