com.proofpoint.log.Logger.info()方法的使用及代码示例

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

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

Logger.info介绍

[英]Logs a message at INFO level.

Usage example:

logger.info("value is %s (%d ms)", value, time);

If the format string is invalid or the arguments are insufficient, an error will be logged and execution will continue.
[中]在信息级别记录消息。
用法示例:

logger.info("value is %s (%d ms)", value, time);

如果格式字符串无效或参数不足,将记录错误并继续执行。

代码示例

代码示例来源:origin: com.proofpoint.platform/log

public synchronized void disableConsole()
{
  log.info("Disabling stderr output");
  ROOT.removeHandler(consoleHandler);
  consoleHandler = null;
}

代码示例来源:origin: com.proofpoint.galaxy/galaxy-coordinator

private void expectedStateStoreUp()
{
  if (storeUp.compareAndSet(false, true)) {
    log.info("Expected state store is up");
  }
}

代码示例来源:origin: com.proofpoint.platform/log

@SuppressWarnings("MethodMayBeStatic")
public void logToFile(String logPath, int maxHistory, DataSize maxSize, DataSize maxTotalSize)
{
  log.info("Logging to %s", logPath);
  RollingFileHandler rollingFileHandler = new RollingFileHandler(logPath, maxHistory, maxSize, maxTotalSize);
  ROOT.addHandler(rollingFileHandler);
}

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

@Override
public void run()
{
  log.info("Listening for thrift clients...");
  serverEngine.serve();
}

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

public void stopServer()
  {
    log.info("Stopping listening for thrift clients");
    serverEngine.stop();
  }
}

代码示例来源:origin: com.proofpoint.platform/jmx-http

@PUT
  public void stopAnnouncing(@Context SecurityContext securityContext, @HeaderParam("Authorization") String authHeader)
  {
    adminServerCredentialVerifier.authenticate(securityContext, authHeader);

    if (announcer != null) {
      log.info("Received shutdown request. Stopping discovery announcer.");
      announcer.destroy();
    }
  }
}

代码示例来源:origin: com.proofpoint.platform/bootstrap

@Override
  public void flush()
  {
    BufferedReader in = new BufferedReader(new StringReader(getBuffer().toString()));
    while (true) {
      try {
        String line = in.readLine();
        if (line == null) {
          break;
        }
        logger.info("%s", line);
      }
      catch (IOException e) {
        throw new Error(e); // should never get here
      }
    }

    getBuffer().setLength(0);
  }
}

代码示例来源:origin: com.proofpoint.platform/log

/**
   * write the current buffer contents to the underlying logger.
   */
  @Override
  public synchronized void flush()
      throws IOException
  {
    super.flush();
    String record = this.toString("UTF-8");
    reset();

    if (record.isEmpty() || record.equals(lineSeparator)) {
      // avoid empty records
      return;
    }

    logger.info("%s", record);
  }
}

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

@Override
public void startRPCServer()
{
  synchronized (this) {
    if (!isRunning) {
      log.info("Cassandra starting...");
      server = new ThriftServer(listenAddr, listenPort);
      server.start();
      isRunning = true;
    }
  }
}

代码示例来源:origin: com.proofpoint.platform/bootstrap

log.info("Life cycle stopping...");
stopList(stopTrafficInstances, StopTraffic.class);
log.info("Life cycle unannounced...");
long stopTrafficDelay = config.getStopTrafficDelay().toMillis();
if (stopTrafficDelay != 0) {
log.info("Life cycle stopped accepting new requests...");
stopList(managedInstances, PreDestroy.class);
log.info("Life cycle stopped.");

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

@Override
public void stopRPCServer()
{
  synchronized (this) {
    if (isRunning) {
      log.info("Cassandra shutting down...");
      server.stopServer();
      try {
        server.join();
      }
      catch (InterruptedException e) {
        log.error(e, "Interrupted while waiting for thrift server to stop");
        Thread.currentThread().interrupt();
      }
      isRunning = false;
    }
  }
}

代码示例来源:origin: com.proofpoint.platform/log

@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
private void rewireStdStreams()
{
  logConsole(new NonCloseableOutputStream(System.err));
  log.info("Logging to stderr");
  redirectStdStreams();
}

代码示例来源:origin: com.proofpoint.platform/bootstrap

throw new Exception("System already starting");
log.info("Life cycle starting...");
log.info("Life cycle startup complete. System ready.");

代码示例来源:origin: com.proofpoint.platform/bootstrap

log.info("Loading configuration");
builder = builder
    .withFile(System.getProperty("config"))
log.info("Initializing logging");
LoggingConfiguration configuration = configurationFactory.build(LoggingConfiguration.class);
logging.configure(configuration);
try {
  NodeInfo nodeInfo = injector.getInstance(NodeInfo.class);
  log.info("Node ID %s", nodeInfo.getNodeId());

代码示例来源:origin: com.proofpoint.galaxy/galaxy-coordinator

@Override
public void setServiceInventory(List<ServiceDescriptor> serviceInventory)
{
  if (agentStatus.getState() == ONLINE) {
    Preconditions.checkNotNull(serviceInventory, "serviceInventory is null");
    URI internalUri = agentStatus.getInternalUri();
    try {
      Request request = RequestBuilder.preparePut()
          .setUri(uriBuilderFrom(internalUri).appendPath("/v1/serviceInventory").build())
          .setHeader(CONTENT_TYPE, APPLICATION_JSON)
          .setBodyGenerator(jsonBodyGenerator(serviceDescriptorsCodec, new ServiceDescriptorsRepresentation(environment, serviceInventory)))
          .build();
      httpClient.execute(request, createStatusResponseHandler());
      if (serviceInventoryUp.compareAndSet(false, true)) {
        log.info("Service inventory put succeeded for agent at %s", internalUri);
      }
    }
    catch (Exception e) {
      if (serviceInventoryUp.compareAndSet(true, false) && !log.isDebugEnabled()) {
        log.error("Unable to post service inventory to agent at %s: %s", internalUri, e.getMessage());
      }
      log.debug(e, "Unable to post service inventory to agent at %s: %s", internalUri, e.getMessage());
    }
  }
}

代码示例来源:origin: com.proofpoint.galaxy/galaxy-agent

Preconditions.checkState(!terminated, "Slot has been terminated");
log.info("Becoming %s with %s", installation.getAssignment().getBinary(), installation.getAssignment().getConfig());

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

String socketName = String.format("%s:%s", listenAddr.getHostAddress(), listenPort);
try {
  log.info("Binding thrift service to " + socketName);
  tServerSocket = new TCustomServerSocket(
      new InetSocketAddress(listenAddr, listenPort),
TTransportFactory inTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
TTransportFactory outTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
log.info("Using TFastFramedTransport with a max frame size of %s bytes", tFramedTransportSize);

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

private void setup()
    throws IOException, ConfigurationException
  log.info("Heap size: %s/%s", Runtime.getRuntime().totalMemory(), Runtime.getRuntime().maxMemory());
  CLibrary.tryMlockall();

代码示例来源:origin: com.proofpoint.platform/http-server

adminExternalUri = buildUri("http", nodeInfo.getExternalAddress(), adminUri.getPort());
Logger.get("Bootstrap").info("Admin service on %s", adminUri);

相关文章