gpt4 book ai didi

org.gridkit.zerormi.zlog.ZLogger.get()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 23:35:31 26 4
gpt4 key购买 nike

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

ZLogger.get介绍

暂无

代码示例

代码示例来源:origin: gridkit/nanocloud

public LogStream get(String path, LogLevel level) {
  return root.get(path, level);
}

代码示例来源:origin: org.gridkit.lab/zerormi

public RemotingHub(ZLogger logger) {
  try {
    this.logInfo = logger.get(getClass().getSimpleName(), LogLevel.INFO);
    this.logWarn = logger.get(getClass().getSimpleName(), LogLevel.WARN);
    this.logError = logger.get(getClass().getSimpleName(), LogLevel.CRITICAL);
    srnd = SecureRandom.getInstance("SHA1PRNG");
  } catch (NoSuchAlgorithmException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: gridkit/nanocloud

public RemotingHub(ZLogger logger) {
  try {
    this.logInfo = logger.get(getClass().getSimpleName(), LogLevel.INFO);
    this.logWarn = logger.get(getClass().getSimpleName(), LogLevel.WARN);
    this.logError = logger.get(getClass().getSimpleName(), LogLevel.CRITICAL);
    srnd = SecureRandom.getInstance("SHA1PRNG");
  } catch (NoSuchAlgorithmException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: gridkit/nanocloud

public RmiChannel1(String name, OutputChannel output, Executor callDispatcher, RmiMarshaler marshaler, ZLogger logger, Map<String, Object> props) {
  this.name = name;
  this.messageOut = output;
  this.callDispatcher = callDispatcher;
  this.marshaler = marshaler;
  this.logCritical = logger.get(getClass().getSimpleName(), LogLevel.CRITICAL);
  this.debugRpcDelay = readPropLong(props, "gridkit.zerormi.debug.rpc-delay", 0);
}

代码示例来源:origin: org.gridkit.lab/zerormi

public RmiChannel1(String name, OutputChannel output, Executor callDispatcher, RmiMarshaler marshaler, ZLogger logger, Map<String, Object> props) {
  this.name = name;
  this.messageOut = output;
  this.callDispatcher = callDispatcher;
  this.marshaler = marshaler;
  this.logCritical = logger.get(getClass().getSimpleName(), LogLevel.CRITICAL);
  this.debugRpcDelay = readPropLong(props, "gridkit.zerormi.debug.rpc-delay", 0);
}

代码示例来源:origin: gridkit/nanocloud

public RmiGateway(String name, RmiMarshaler marshaler, ZLogger logger, Map<String, Object> props) {
  // TODO should include counter agent
  this.executor = createRmiExecutor();
  this.channel = new RmiChannel1(name, new MessageOut(), executor, marshaler, logger, props);
  this.service = new RemoteExecutionService();
  this.name = name;
  this.logVerbose = logger.get(getClass().getSimpleName(), LogLevel.VERBOSE);
  this.logInfo = logger.get(getClass().getSimpleName(), LogLevel.INFO);
  this.logCritical = logger.get(getClass().getSimpleName(), LogLevel.CRITICAL);
}

代码示例来源:origin: org.gridkit.lab/zerormi

public RmiGateway(String name, RmiMarshaler marshaler, ZLogger logger, Map<String, Object> props) {
  // TODO should include counter agent
  this.executor = createRmiExecutor();
  this.channel = new RmiChannel1(name, new MessageOut(), executor, marshaler, logger, props);
  this.service = new RemoteExecutionService();
  this.name = name;
  this.logVerbose = logger.get(getClass().getSimpleName(), LogLevel.VERBOSE);
  this.logInfo = logger.get(getClass().getSimpleName(), LogLevel.INFO);
  this.logCritical = logger.get(getClass().getSimpleName(), LogLevel.CRITICAL);
}

代码示例来源:origin: gridkit/nanocloud

@Override
public LogStream get(String path, LogLevel level) {
  level.toString();
  String ln = this.path;
  if (path != null && path.length() > 0) {
    ln += (ln.length() == 0 ? "" : ".") + path;
  }
  return new FilteredLogStream(logger.get(path, level), ln, level);
}

代码示例来源:origin: gridkit/nanocloud

return zlog.get(loggerName, logLevel);

代码示例来源:origin: org.gridkit.lab/telecontrol-ssh

private void startTunneler() throws JSchException, IOException {
  verifyJavaVersion();
  
  ChannelExec exec = (ChannelExec) session.openChannel("exec");
  
  String cmd = rconfig.getJavaExec() + " -Xms32m -Xmx32m -jar " + tunnellerJarPath;
  exec.setCommand(cmd);
  // use std out for binary communication
  InputStream cin = exec.getInputStream();
  OutputStream cout = exec.getOutputStream();
  // use std err for diagnostic output
  OutputStream tunnel = new LoggerPrintStream(logger.get("console", LogLevel.WARN));
  streamCopyService.link(exec.getExtInputStream(), tunnel, false);
  // unfortunately Pty will merge out and err, so it should be disabled
  exec.setPty(false);
  exec.connect();
  PrintStream diagLog = new LoggerPrintStream(logger.get("console", LogLevel.WARN));
  
  try {
    control = new TunnellerConnection(rconfig.getHost(), cin, cout, diagLog, connectTimeoutMS, TimeUnit.MILLISECONDS);
  } catch (InterruptedException e) {
    killAndDrop(exec);
    throw new IOException("Connection aborted due to thread interrupt");
  } catch (TimeoutException e) {
    throw new IOException("Tunneller connection timeout");
  }
}

代码示例来源:origin: org.gridkit.lab/telecontrol-ssh

OutputStream cout = exec.getOutputStream();
PrintStream out = new LoggerPrintStream(logger.get("diag", LogLevel.WARN));

代码示例来源:origin: gridkit/nanocloud

private void startTunneler() throws JSchException, IOException {
  verifyJavaVersion();
  
  ChannelExec exec = (ChannelExec) session.openChannel("exec");
  
  String cmd = rconfig.getJavaExec() + " -Xms32m -Xmx32m -jar " + tunnellerJarPath;
  exec.setCommand(cmd);
  // use std out for binary communication
  InputStream cin = exec.getInputStream();
  OutputStream cout = exec.getOutputStream();
  // use std err for diagnostic output
  OutputStream tunnel = new LoggerPrintStream(logger.get("console", LogLevel.WARN));
  streamCopyService.link(exec.getExtInputStream(), tunnel, false);
  // unfortunately Pty will merge out and err, so it should be disabled
  exec.setPty(false);
  exec.connect();
  PrintStream diagLog = new LoggerPrintStream(logger.get("console", LogLevel.WARN));
  
  try {
    control = new TunnellerConnection(rconfig.getHost(), cin, cout, diagLog, connectTimeoutMS, TimeUnit.MILLISECONDS);
  } catch (InterruptedException e) {
    killAndDrop(exec);
    throw new IOException("Connection aborted due to thread interrupt");
  } catch (TimeoutException e) {
    throw new IOException("Tunneller connection timeout");
  }
}

代码示例来源:origin: gridkit/nanocloud

OutputStream cout = exec.getOutputStream();
PrintStream out = new LoggerPrintStream(logger.get("diag", LogLevel.WARN));

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com