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

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

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

Logger介绍

暂无

代码示例

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

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

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

  1. public void resetVisionOffsets() {
  2. if (visionOffset != null) {
  3. visionOffset = null;
  4. Logger.debug("resetVisionOffsets " + visionOffset);
  5. }
  6. partPitch = null;
  7. }

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

  1. @Override
  2. public int i(String tag, String msg) {
  3. Logger.info(msg);
  4. return Log.i(tag, msg);
  5. }
  6. @Override

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

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

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

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

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

  1. public void unregisterThirdPartyReceiver() {
  2. if(thirdPartyReceiver == null) {
  3. Logger.warn(ThirdPartyReceiver.class.getSimpleName() + " not registered, skipping.");
  4. return;
  5. }
  6. context.unregisterReceiver(thirdPartyReceiver);
  7. thirdPartyReceiver = null;
  8. Logger.debug("Unregistered " + ThirdPartyReceiver.class.getSimpleName());
  9. }

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

  1. protected void setPolarity(Polarity polarity) {
  2. Logger.info("setPolarity(" + polarity + ")");
  3. try (FileWriter writer = new FileWriter(pwmRoot.resolve("polarity").toFile())) {
  4. writer.write(polarity.getValue());
  5. writer.flush();
  6. } catch (IOException e) {
  7. Logger.error(e, "Error setting polarity to {}: {}", polarity.getValue(), e);
  8. }
  9. }

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

  1. @Override
  2. public int v(String tag, String msg) {
  3. Logger.trace(msg);
  4. return Log.v(tag, msg);
  5. }
  6. @Override

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

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

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

  1. @Override
  2. public int i(String tag, String msg, Throwable tr) {
  3. Logger.info(tr, msg);
  4. return Log.i(tag, msg, tr);
  5. }
  6. @Override

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

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

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

  1. @Override
  2. public void exceptionCaught(ChannelHandlerContext context, Throwable cause) {
  3. Logger.error(cause, "exceptionCaught: {}", cause);
  4. context.close();
  5. }
  6. }

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

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

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

  1. @Override
  2. public int v(String tag, String msg, Throwable tr) {
  3. Logger.trace(tr, msg);
  4. return Log.v(tag, msg, tr);
  5. }
  6. @Override

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

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

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

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

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

  1. @Override
  2. public int w(String tag, String msg, Throwable tr) {
  3. Logger.warn(tr, msg);
  4. return Log.w(tag, msg, tr);
  5. }
  6. @Override

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

  1. @Override
  2. public int e(String tag, String msg) {
  3. Logger.error(msg);
  4. return Log.e(tag, msg);
  5. }
  6. @Override

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

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

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

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

相关文章