org.apache.logging.log4j.core.config.Configuration.getAdvertiser()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(152)

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

Configuration.getAdvertiser介绍

暂无

代码示例

代码示例来源:origin: apache/hive

isAdvertise ? config.getAdvertiser() : null
);

代码示例来源:origin: ops4j/org.ops4j.pax.logging

@Override
public MemoryMappedFileAppender build() {
  final String name = getName();
  final int actualRegionLength = determineValidRegionLength(name, regionLength);
  if (name == null) {
    LOGGER.error("No name provided for MemoryMappedFileAppender");
    return null;
  }
  if (fileName == null) {
    LOGGER.error("No filename provided for MemoryMappedFileAppender with name " + name);
    return null;
  }
  final Layout<? extends Serializable> layout = getOrCreateLayout();
  final MemoryMappedFileManager manager = MemoryMappedFileManager.getFileManager(fileName, append, isImmediateFlush(),
      actualRegionLength, advertiseURI, layout);
  if (manager == null) {
    return null;
  }
  return new MemoryMappedFileAppender(name, layout, getFilter(), manager, fileName, isIgnoreExceptions(), false,
      advertise ? getConfiguration().getAdvertiser() : null);
}

代码示例来源:origin: ops4j/org.ops4j.pax.logging

@Override
public RandomAccessFileAppender build() {
  final String name = getName();
  if (name == null) {
    LOGGER.error("No name provided for FileAppender");
    return null;
  }
  if (fileName == null) {
    LOGGER.error("No filename provided for FileAppender with name " + name);
    return null;
  }
  final Layout<? extends Serializable> layout = getOrCreateLayout();
  final boolean immediateFlush = isImmediateFlush();
  final RandomAccessFileManager manager = RandomAccessFileManager.getFileManager(fileName, append,
      immediateFlush, getBufferSize(), advertiseURI, layout, null);
  if (manager == null) {
    return null;
  }
  return new RandomAccessFileAppender(name, layout, getFilter(), manager, fileName, isIgnoreExceptions(),
      immediateFlush, advertise ? getConfiguration().getAdvertiser() : null);
}

代码示例来源:origin: ops4j/org.ops4j.pax.logging

@Override
public FileAppender build() {
  boolean bufferedIo = isBufferedIo();
  final int bufferSize = getBufferSize();
  if (locking && bufferedIo) {
    LOGGER.warn("Locking and buffering are mutually exclusive. No buffering will occur for {}", fileName);
    bufferedIo = false;
  }
  if (!bufferedIo && bufferSize > 0) {
    LOGGER.warn("The bufferSize is set to {} but bufferedIo is false: {}", bufferSize, bufferedIo);
  }
  final Layout<? extends Serializable> layout = getOrCreateLayout();
  final FileManager manager = FileManager.getFileManager(fileName, append, locking, bufferedIo, createOnDemand,
      advertiseUri, layout, bufferSize, filePermissions, fileOwner, fileGroup, getConfiguration());
  if (manager == null) {
    return null;
  }
  return new FileAppender(getName(), layout, getFilter(), manager, fileName, isIgnoreExceptions(),
      !bufferedIo || isImmediateFlush(), advertise ? getConfiguration().getAdvertiser() : null);
}

代码示例来源:origin: org.infinispan/infinispan-commons-test

isAdvertise ? config.getAdvertiser() : null);

代码示例来源:origin: ops4j/org.ops4j.pax.logging

isIgnoreExceptions(), immediateFlush, bufferSize, advertise ? getConfiguration().getAdvertiser() : null);

代码示例来源:origin: ops4j/org.ops4j.pax.logging

isIgnoreExceptions(), isImmediateFlush(), advertise ? getConfiguration().getAdvertiser() : null);

代码示例来源:origin: ops4j/org.ops4j.pax.logging

@SuppressWarnings("resource")
  @Override
  public SocketAppender build() {
    boolean immediateFlush = isImmediateFlush();
    final boolean bufferedIo = isBufferedIo();
    final Layout<? extends Serializable> layout = getLayout();
    if (layout == null) {
      AbstractLifeCycle.LOGGER.error("No layout provided for SocketAppender");
      return null;
    }
    final String name = getName();
    if (name == null) {
      AbstractLifeCycle.LOGGER.error("No name provided for SocketAppender");
      return null;
    }
    final Protocol protocol = getProtocol();
    final Protocol actualProtocol = protocol != null ? protocol : Protocol.TCP;
    if (actualProtocol == Protocol.UDP) {
      immediateFlush = true;
    }
    final AbstractSocketManager manager = SocketAppender.createSocketManager(name, actualProtocol, getHost(), getPort(),
        getConnectTimeoutMillis(), getSslConfiguration(), getReconnectDelayMillis(), getImmediateFail(), layout, getBufferSize(), getSocketOptions());
    return new SocketAppender(name, layout, getFilter(), manager, isIgnoreExceptions(),
        !bufferedIo || immediateFlush, getAdvertise() ? getConfiguration().getAdvertiser() : null);
  }
}

代码示例来源:origin: ops4j/org.ops4j.pax.logging

getAdvertise() ? configuration.getAdvertiser() : null);

相关文章