gpt4 book ai didi

com.openhtmltopdf.util.XRLog类的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 05:01:05 25 4
gpt4 key购买 nike

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

XRLog介绍

[英]Utility class for using the java.util.logging package. Relies on the standard configuration for logging, but gives easier access to the various logs (plumbing.load, .init, .render)
[中]用于使用java的实用程序类。util。日志包。依赖于日志记录的标准配置,但可以更轻松地访问各种日志(pipeoping.load、.init、.render)

代码示例

代码示例来源:origin: danfickle/openhtmltopdf

public static void main(String args[]) {
  try {
    XRLog.cascade("Cascade msg");
    XRLog.cascade(Level.WARNING, "Cascade msg");
    XRLog.exception("Exception msg");
    XRLog.exception("Exception msg", new Exception());
    XRLog.general("General msg");
    XRLog.general(Level.WARNING, "General msg");
    XRLog.init("Init msg");
    XRLog.init(Level.WARNING, "Init msg");
    XRLog.load("Load msg");
    XRLog.load(Level.WARNING, "Load msg");
    XRLog.match("Match msg");
    XRLog.match(Level.WARNING, "Match msg");
    XRLog.layout("Layout msg");
    XRLog.layout(Level.WARNING, "Layout msg");
    XRLog.render("Render msg");
    XRLog.render(Level.WARNING, "Render msg");
  } catch (Exception ex) {
    ex.printStackTrace();
  }
}

代码示例来源:origin: danfickle/openhtmltopdf

public void error(String uri, String message) {
    XRLog.cssParse("(" + uri + ") " + message);
  }
});

代码示例来源:origin: danfickle/openhtmltopdf

public static synchronized void log(String where, Level level, String msg, Throwable th) {
  if (initPending) {
    init();
  }
  if (isLoggingEnabled()) {
    loggerImpl.log(where, level, msg, th);
  }
}

代码示例来源:origin: danfickle/openhtmltopdf

@Override
public FSCacheValue get(String key, Callable<? extends FSCacheValue> loader) {
  if (_store.containsKey(key)) {
    return this.get(key);
  }

  FSCacheValue value;
  try {
    value = loader.call();
    if (value != null) {
      _store.put(key, value);
    }
  } catch (Exception e) {
    XRLog.exception("Could not load cache value for key(" + key + ")", e);
    value = null;
  }
  
  XRLog.load(Level.INFO, (value == null ? "Missed" : "Hit") + " key(" + key + ") from cache.");
  return value;
}

代码示例来源:origin: danfickle/openhtmltopdf

/**
 * Logs the exception message.
 *
 * @param msg  Message for the log.
 */
private void log( String msg ) {
  XRLog.exception( "Unhandled exception. " + msg );
}

代码示例来源:origin: danfickle/openhtmltopdf

public void repaintRequested(boolean doLayout) {
    XRLog.general(Level.FINE, "No-op repaint requested");
  }
};

代码示例来源:origin: danfickle/openhtmltopdf

XRLog.general(Level.WARNING, "Could not find font (" + family + ") specifed for MathML object in font-face rules");
return;
byte[] font1 = _sharedCtx.getUserAgentCallback().getBinaryResource(src);
if (font1 == null) {
  XRLog.exception("Could not load font " + src);
  continue;
  _fontFactory.registerFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(font1));
} catch (IOException e) {
  XRLog.exception("Couldn't read memory!", e);
} catch (FontFormatException e) {
  XRLog.exception("Could not read font correctly", e);

代码示例来源:origin: danfickle/openhtmltopdf

public static void render(String msg) {
  render(Level.INFO, msg);
}

代码示例来源:origin: danfickle/openhtmltopdf

public static void load(String msg) {
  load(Level.INFO, msg);
}

代码示例来源:origin: danfickle/openhtmltopdf

/**
 * Description of the Method
 *
 * @param object PARAM
 */
public static void p(Object object) {
  init();
  StringWriter sw = new StringWriter();
  PrintWriter pw = new PrintWriter(sw);
  utilAsString.setPrintWriter(pw);
  utilAsString.print(object);// our log adds a newline
  pw.flush();
  if (XRLog.isLoggingEnabled()) {
    XRLog.general(sw.getBuffer().toString());
  }
}

代码示例来源:origin: danfickle/openhtmltopdf

public static void init(String msg) {
  init(Level.INFO, msg);
}

代码示例来源:origin: danfickle/openhtmltopdf

@Override
  public void error(TranscoderException arg0) throws TranscoderException {
    XRLog.exception("SVG ERROR", arg0);
  }
};

代码示例来源:origin: danfickle/openhtmltopdf

public static void general(String msg) {
  general(Level.INFO, msg);
}

代码示例来源:origin: com.openhtmltopdf/openhtmltopdf-mathml-support

XRLog.general(Level.WARNING, "Could not find font (" + family + ") specifed for MathML object in font-face rules");
return;
byte[] font1 = _sharedCtx.getUserAgentCallback().getBinaryResource(src);
if (font1 == null) {
  XRLog.exception("Could not load font " + src);
  continue;
  _fontFactory.registerFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(font1));
} catch (IOException e) {
  XRLog.exception("Couldn't read memory!", e);
} catch (FontFormatException e) {
  XRLog.exception("Could not read font correctly", e);

代码示例来源:origin: danfickle/openhtmltopdf

@Override
public List<AffineTransform> pushTransforms(List<AffineTransform> transforms) {
  List<AffineTransform> inverse = new ArrayList<AffineTransform>(transforms.size());
  AffineTransform gfxTransform = _graphics.getTransform();
  try {
    for (AffineTransform transform : transforms) {
      inverse.add(transform.createInverse());
      transformStack.push(transform);
      gfxTransform.concatenate(transform);
    }
  } catch (NoninvertibleTransformException e) {
    XRLog.render(Level.WARNING, "Tried to set a non-invertible CSS transform. Ignored.");
  }
  _graphics.setTransform(gfxTransform);
  return inverse;
}

代码示例来源:origin: danfickle/openhtmltopdf

@Override
  public FSCacheValue get(String key) {
    FSCacheValue value = _store.get(key);
    XRLog.load(Level.INFO, (value == null ? "Missed" : "Hit") + " key(" + key + ") from cache.");
    return value;
  }
}

代码示例来源:origin: danfickle/openhtmltopdf

/**
 * Description of the Method
 *
 * @param object PARAM
 */
public static void pr(Object object) {
  init();
  StringWriter sw = new StringWriter();
  PrintWriter pw = new PrintWriter(sw);
  utilAsString.setPrintWriter(pw);
  utilAsString.print(object);// our log adds a newline
  pw.flush();
  if (XRLog.isLoggingEnabled()) {
    XRLog.general(sw.getBuffer().toString());
  }
  //util.print( object );
}

代码示例来源:origin: danfickle/openhtmltopdf

public static synchronized void log(String where, Level level, String msg) {
  if (initPending) {
    init();
  }
  if (isLoggingEnabled()) {
    loggerImpl.log(where, level, msg);
  }
}

代码示例来源:origin: danfickle/openhtmltopdf

public static synchronized void setLevel(String log, Level level) {
  if (initPending) {
    init();
  }
  loggerImpl.setLevel(log, level);
}

代码示例来源:origin: danfickle/openhtmltopdf

/**
   * Logs the exception's message, plus the Throwable that caused the
   * exception to be thrown.
   *
   * @param msg    Message for the log.
   * @param cause  Throwable that caused this exception to be thrown (e.g.
   *      IOException.
   */
  private void log( String msg, Throwable cause ) {
    XRLog.exception( "Unhandled exception. " + msg, cause );
  }
}

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