org.xwiki.component.logging.Logger类的使用及代码示例

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

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

Logger介绍

暂无

代码示例

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

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

代码示例来源: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-extension-api

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

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

isEnabled = getLogger().isWarnEnabled();
  break;
case LogChute.INFO_ID:
  isEnabled = getLogger().isDebugEnabled();
  break;
case LogChute.DEBUG_ID:
  isEnabled = getLogger().isDebugEnabled();
  break;
case LogChute.ERROR_ID:
  isEnabled = getLogger().isErrorEnabled();
  break;
default:
  isEnabled = getLogger().isDebugEnabled();
  break;

代码示例来源: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-extension-api

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

代码示例来源: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-xml

source = new InputSource(istream);
  } else {
    getLogger().warn(String.format("Failed to load resource [%s] locally. "
      + "Will try to get it online at [%s]", filename, systemId));
  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));
    source = new InputSource(istream);
  } else {
    getLogger().warn("Failed to load resource [" + systemId + "] locally.");
getLogger().warn(String.format("Invalid URI [%s]", systemId), e);

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

/**
 * {@inheritDoc}
 * 
 * @see org.codehaus.plexus.logging.Logger#isFatalErrorEnabled()
 */
public boolean isFatalErrorEnabled()
{
  return this.logger.isErrorEnabled();
}

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

/**
 * {@inheritDoc}
 * 
 * @see org.codehaus.plexus.logging.Logger#isDebugEnabled()
 */
public boolean isDebugEnabled()
{
  return this.logger.isDebugEnabled();
}

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

/**
 * {@inheritDoc}
 * 
 * @see org.codehaus.plexus.logging.Logger#isWarnEnabled()
 */
public boolean isWarnEnabled()
{
  return this.logger.isWarnEnabled();
}

代码示例来源: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#warn(java.lang.String)
 */
public void warn(String message)
{
  this.logger.warn(message);
}

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

getLogger().debug(ex.getMessage(), ex);
} catch (WikiMacroException ex) {
  getLogger().error(ex.getMessage(), ex);
} finally {
  if (originalAuthor != null) {

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

/**
 * {@inheritDoc}
 * 
 * @see org.codehaus.plexus.logging.Logger#isErrorEnabled()
 */
public boolean isErrorEnabled()
{
  return this.logger.isErrorEnabled();
}

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

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

代码示例来源: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-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-extension-api

public List<ExtensionRepositoryId> getRepositories()
{
  List<ExtensionRepositoryId> repositories = new ArrayList<ExtensionRepositoryId>();
  List<String> repositoryStrings =
    this.configurationSource.getProperty("extension.repositories", Collections.<String> emptyList());
  if (repositoryStrings != null && !repositoryStrings.isEmpty()) {
    for (String repositoryString : repositoryStrings) {
      try {
        ExtensionRepositoryId extensionRepositoryId = parseRepository(repositoryString);
        repositories.add(extensionRepositoryId);
      } catch (Exception e) {
        getLogger().warn("Faild to parse repository [" + repositoryString + "] from configuration", e);
      }
    }
  } else {
    try {
      repositories.add(new ExtensionRepositoryId("xwiki-releases", "maven", new URI(
        "http://maven.xwiki.org/releases/")));
      repositories.add(new ExtensionRepositoryId("central", "maven",
        new URI("http://repo1.maven.org/maven2/")));
    } catch (Exception e) {
      // Should never happen
    }
  }
  return repositories;
}

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

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

相关文章