org.pmw.tinylog.Logger类的使用及代码示例

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

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

Logger介绍

暂无

代码示例

代码示例来源:origin: looly/hutool

public TinyLog(Class<?> clazz) {
  this.name = clazz.getName();
  this.level = Logger.getLevel(name).ordinal();
}

代码示例来源:origin: openpnp/openpnp

public void resetVisionOffsets() {
  if (visionOffset != null) {
    visionOffset = null;
    Logger.debug("resetVisionOffsets " + visionOffset);
  }
  partPitch = null;
}

代码示例来源:origin: mathisdt/trackworktime

@Override
public int i(String tag, String msg) {
  Logger.info(msg);
  return Log.i(tag, msg);
}
@Override

代码示例来源:origin: mattjlewis/diozero

@Override
public void setBoardPwmFrequency(int pwmFrequency) {
  // Not supported
  Logger.warn("Cannot change PWM frequency for the Piconzero");
}

代码示例来源:origin: pingao777/markdown-preview-sync

public static byte[] getBytes(String string) {
    try {
      return string.getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {
      Logger.error("Error occurs on get bytes of {}", string, e);
    }
    return new byte[0];
  }
}

代码示例来源:origin: mathisdt/trackworktime

public void unregisterThirdPartyReceiver() {
  if(thirdPartyReceiver == null) {
    Logger.warn(ThirdPartyReceiver.class.getSimpleName() + " not registered, skipping.");
    return;
  }
  context.unregisterReceiver(thirdPartyReceiver);
  thirdPartyReceiver = null;
  Logger.debug("Unregistered " + ThirdPartyReceiver.class.getSimpleName());
}

代码示例来源:origin: mattjlewis/diozero

protected void setPolarity(Polarity polarity) {
  Logger.info("setPolarity(" + polarity + ")");
  try (FileWriter writer = new FileWriter(pwmRoot.resolve("polarity").toFile())) {
    writer.write(polarity.getValue());
    writer.flush();
  } catch (IOException e) {
    Logger.error(e, "Error setting polarity to {}: {}", polarity.getValue(), e);
  }
}

代码示例来源:origin: mathisdt/trackworktime

@Override
public int v(String tag, String msg) {
  Logger.trace(msg);
  return Log.v(tag, msg);
}
@Override

代码示例来源:origin: openpnp/openpnp

@Override
public void setEnabled(boolean enabled) throws Exception {
  Logger.debug("setEnabled({})", enabled);
  this.enabled = enabled;
}

代码示例来源:origin: mathisdt/trackworktime

@Override
public int i(String tag, String msg, Throwable tr) {
  Logger.info(tr, msg);
  return Log.i(tag, msg, tr);
}
@Override

代码示例来源:origin: mattjlewis/diozero

@Override
public void setBoardPwmFrequency(int frequency) {
  // Ignore
  Logger.warn("Not implemented");
}

代码示例来源:origin: mattjlewis/diozero

@Override
  public void exceptionCaught(ChannelHandlerContext context, Throwable cause) {
    Logger.error(cause, "exceptionCaught: {}", cause);
    context.close();
  }
}

代码示例来源:origin: mattjlewis/diozero

public void closed(DeviceInterface device) {
  Logger.debug("closed({})", device.getKey());
  if (devices.remove(device.getKey()) == null) {
    Logger.warn("Request to close unknown device with key '{}'", device.getKey());
  }
}

代码示例来源:origin: mathisdt/trackworktime

@Override
public int v(String tag, String msg, Throwable tr) {
  Logger.trace(tr, msg);
  return Log.v(tag, msg, tr);
}
@Override

代码示例来源:origin: openpnp/openpnp

@Override
public void setEnabled(boolean enabled) throws Exception {
  Logger.debug("setEnabled({})", enabled);
  this.enabled = enabled;
}

代码示例来源:origin: mattjlewis/diozero

private void setEnabled(boolean enabled) throws IOException {
  Logger.info("setEnabled(" + enabled + ")");
  try (FileWriter writer = new FileWriter(pwmRoot.resolve("enable").toFile())) {
    writer.write(enabled ? "1" : "0");
  }
}

代码示例来源:origin: mathisdt/trackworktime

@Override
public int w(String tag, String msg, Throwable tr) {
  Logger.warn(tr, msg);
  return Log.w(tag, msg, tr);
}
@Override

代码示例来源:origin: mathisdt/trackworktime

@Override
public int e(String tag, String msg) {
  Logger.error(msg);
  return Log.e(tag, msg);
}
@Override

代码示例来源:origin: looly/hutool

public TinyLog(String name) {
  this.name = name;
  this.level = Logger.getLevel(name).ordinal();
}

代码示例来源:origin: zhicwu/cassandra-jdbc-driver

public CassandraColumnDefinition getColumnDefinition(int column)
    throws SQLException {
  if (column > 0 && column <= columnDefinitions.size()) {
    return columnDefinitions.get(column - 1);
  }
  Logger.trace("Columns for your reference: " + columnNameIndices);
  throw new SQLException("Column " + column + " does not exists!");
}

相关文章