org.pmw.tinylog.Logger.warn()方法的使用及代码示例

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

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

Logger.warn介绍

暂无

代码示例

代码示例来源: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 setBoardPwmFrequency(int pwmFrequency) {
  3. // Not supported
  4. Logger.warn("Cannot change PWM frequency for the Piconzero");
  5. }

代码示例来源: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 w(String tag, Throwable tr) {
  3. Logger.warn(tr);
  4. return Log.w(tag, tr);
  5. }
  6. @Override

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

  1. private void tryPebbleNotification(String message) {
  2. try {
  3. externalNotificationManager.notifyPebble(message);
  4. } catch (Exception e) {
  5. Logger.warn("Pebble notification failed");
  6. }
  7. }

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

  1. @Override
  2. public void error(Throwable t) {
  3. Logger.warn("error receiving the current device location: {}", t);
  4. Intent messageIntent = createMessageIntent(
  5. "Could not get the current location. Please ensure that this app can access the coarse location.",
  6. null);
  7. reference.startActivity(messageIntent);
  8. }
  9. });

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

  1. @Override
  2. protected void closeDevice() {
  3. try { setEnabled(false); } catch (Exception e) { }
  4. try { dutyFile.close(); } catch (Exception e) { }
  5. Path pwm_chip_root = FileSystems.getDefault().getPath("/sys/class/pwm/pwmchip" + pwmChip);
  6. try (FileWriter writer = new FileWriter(pwm_chip_root.resolve("unexport").toFile())) {
  7. writer.write(String.valueOf(pwmNum));
  8. } catch (Exception e) {
  9. Logger.warn(e, "Error closing pwm #" + pwmNum);
  10. }
  11. }

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

  1. static BoardInfo get(String hardware, String revision, Integer memoryKb) {
  2. Logger.warn("Failed to resolve board info for hardware '{}' and revision '{}'. Local O/S: {}",
  3. hardware, revision, System.getProperty("os.name"));
  4. return new UnknownBoardInfo();
  5. }

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

  1. private void tryVibration() {
  2. try {
  3. externalNotificationManager.vibrate(Constants.VIBRATION_PATTERN);
  4. } catch (RuntimeException re) {
  5. Logger.warn("vibration not allowed by permissions");
  6. }
  7. }

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

  1. private void tryPebbleNotification(String message) {
  2. try {
  3. externalNotificationManager.notifyPebble(message);
  4. } catch (Exception e) {
  5. Logger.warn("Pebble notification failed");
  6. }
  7. }

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

  1. private void tryVibration() {
  2. try {
  3. externalNotificationManager.vibrate(Constants.VIBRATION_PATTERN);
  4. } catch (RuntimeException re) {
  5. Logger.warn("vibration not allowed by permissions");
  6. }
  7. }

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

  1. private void search() {
  2. RowFilter<PackagesTableModel, Object> rf = null;
  3. // If current expression doesn't parse, don't update.
  4. try {
  5. rf = RowFilter.regexFilter("(?i)" + searchTextField.getText().trim());
  6. }
  7. catch (PatternSyntaxException e) {
  8. Logger.warn("Search failed", e);
  9. return;
  10. }
  11. tableSorter.setRowFilter(rf);
  12. }

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

  1. private void search() {
  2. RowFilter<PartsTableModel, Object> rf = null;
  3. // If current expression doesn't parse, don't update.
  4. try {
  5. rf = RowFilter.regexFilter("(?i)" + searchTextField.getText().trim());
  6. }
  7. catch (PatternSyntaxException e) {
  8. Logger.warn("Search failed", e);
  9. return;
  10. }
  11. tableSorter.setRowFilter(rf);
  12. }

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

  1. private void search() {
  2. RowFilter<FeedersTableModel, Object> rf = null;
  3. // If current expression doesn't parse, don't update.
  4. try {
  5. rf = RowFilter.regexFilter("(?i)" + searchTextField.getText().trim());
  6. }
  7. catch (PatternSyntaxException e) {
  8. Logger.warn("Search failed", e);
  9. return;
  10. }
  11. tableSorter.setRowFilter(rf);
  12. }

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

  1. @Override
  2. public float getRelativeHumidity() {
  3. byte status = device.readByte(STATUS_REG);
  4. if ((status & SR_H_DA) == 0) {
  5. Logger.warn("Humidity data not available");
  6. return -1;
  7. }
  8. // Read raw humidity
  9. short humidity_raw = device.readShort(HUMIDITY_OUT | READ);
  10. return (h1Rh - h0Rh) * (humidity_raw - h0T0Out) / (h1T0Out - h0T0Out) + h0Rh;
  11. }

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

  1. @Override
  2. public float getPressure() {
  3. byte status = device.readByte(STATUS_REG);
  4. if ((status & SR_P_DA) == 0) {
  5. Logger.warn("Pressure data not available");
  6. return -1;
  7. }
  8. byte[] raw_data = device.readBytes(PRESS_OUT_XL | READ, 3);
  9. int raw_pressure = raw_data[2] << 16 | (raw_data[1] & 0xff) << 8 | (raw_data[0] & 0xff);
  10. return (float) (raw_pressure / PRESSURE_SCALE);
  11. }

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

  1. public LM73(int controller, Configuration config) {
  2. this.config = config;
  3. resolution = DEFAULT_RESOLUTION;
  4. device = new I2CDevice(controller, config.getAddress());
  5. int id = device.readUShort(ID_REG);
  6. if (id != LM73_ID) {
  7. Logger.warn("Expected device id 0x{}, got 0x{}", Integer.toHexString(LM73_ID), Integer.toHexString(id));
  8. }
  9. }

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

  1. @Override
  2. public void enableListener() {
  3. disableListener();
  4. if (edge == PigpioConstants.NO_EDGE) {
  5. Logger.warn("Edge was configured to be NO_EDGE, no point adding a listener");
  6. return;
  7. }
  8. int rc = pigpioImpl.enableListener(gpio, edge, this);
  9. if (rc < 0) {
  10. throw new RuntimeIOException("Error calling pigpioImpl.setISRFunc(), response: " + rc);
  11. }
  12. }

代码示例来源: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: mattjlewis/diozero

  1. @Override
  2. public PwmOutputDeviceInterface createPwmOutputDevice(String key, PinInfo pinInfo, int pwmFrequency,
  3. float initialValue) {
  4. Logger.warn("Using software PWM on gpio {}", Integer.valueOf(pinInfo.getDeviceNumber()));
  5. SoftwarePwmOutputDevice pwm = new SoftwarePwmOutputDevice(key, this,
  6. createDigitalOutputDevice(createPinKey(pinInfo), pinInfo, false), pwmFrequency, initialValue);
  7. return pwm;
  8. }

相关文章