热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.bedework.util.logging.BwLogger类的使用及代码示例

本文整理了Java中org.bedework.util.logging.BwLogger类的一些代码示例,展示了BwLogger类的具体用法。

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

BwLogger介绍

[英]This class provides basic logging support. It also allows for some log messages to be output to multiple loggers. Each stream will be for this class possible prefixed by name + ".". User: mike Date: 12/11/18 Time: 15:51
[中]此类提供基本的日志记录支持。它还允许将一些日志消息输出到多个记录器。对于此类,每个流都可能以名称+“”作为前缀。用户:mike日期:12/11/18时间:15:51

代码示例

代码示例来源:origin: org.bedework/bw-util-xml

@Override
public BwLogger getLogger() {
if ((logger.getLoggedClass() == null) && (logger.getLoggedName() == null)) {
logger.setLoggedClass(getClass());
}
return logger;
}
}

代码示例来源:origin: org.bedework/bw-util-jmx

protected static Object makeObject(final String className) {
try {
Object o = Class.forName(className).newInstance();
if (o == null) {
new BwLogger().setLoggedClass(ConfBase.class)
.error("Class " + className + " not found");
return null;
}
return o;
} catch (Throwable t) {
new BwLogger().setLoggedClass(ConfBase.class)
.error("Unable to make object ", t);
return null;
}
}

代码示例来源:origin: org.bedework/bw-caldav-util

private static void dumpXml(final Node nd) {
final BwLogger logger =
new BwLogger().setLoggedClass(Parser.class);
if (!logger.debug()) {
return;
}
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
// XMLWriter writer = new XMLWriter(out, format);
// writer.write(nd);
TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer serializer;
serializer = tfactory.newTransformer();
//Setup indenting to "pretty print"
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
serializer.transform(new DOMSource(nd), new StreamResult(out));
logger.debug(out.toString());
} catch (Throwable t) {
logger.error("Unable to dump XML");
}
}

代码示例来源:origin: org.bedework/bw-util-servlet

/** Print all the headers
*
* @param req Incoming HttpServletRequest object
*/
public static void dumpHeaders(final HttpServletRequest req) {
Enumeration en = req.getHeaderNames();
while (en.hasMoreElements()) {
String name = (String) en.nextElement();
logger.debug(name + ": " + req.getHeader(name));
}
}

代码示例来源:origin: org.bedework/bw-util-logging

default void setLoggerClass() {
getLogger().setLoggedClass(getClass());
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical

logger.warn("TRANS-TO_EVENT: Got a recurrence id range");
(cal.getCalType() != BwCalendar.calTypePendingInbox) &&
(cal.getCalType() != BwCalendar.calTypeOutbox)) {
if (logger.debug()) {
logger.debug("TRANS-TO_EVENT: try to fetch event with guid=" + guid);
if (logger.debug()) {
if (evinfo != null) {
logger.debug("TRANS-TO_EVENT: fetched event with guid");
} else {
logger.debug("TRANS-TO_EVENT: did not find event with guid");
logger. warn("Mismatched rid ev=" + evrid + " expected " + rid);
logger.debug("Unknown property with name " + prop.getName() +
" class " + prop.getClass() +
" and value " + pval);
fbtype = BwFreeBusyComponent.typeFree;
} else {
if (logger.debug()) {
logger.debug("Unsupported parameter " + par.getName());
if (logger.debug()) {
logger.debug("Unsupported property with index " + pi +
"; class " + prop.getClass() +
" and value " + pval);

代码示例来源:origin: org.bedework/bw-util-hibernate

/**
* @throws HibException
*/
@Override
public void flush() throws HibException {
if (exc != null) {
// Didn't hear me last time?
throw new HibException(exc);
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("About to flush");
}
try {
sess.flush();
} catch (Throwable t) {
handleException(t);
}
}

代码示例来源:origin: org.bedework/bw-util-logging

/**
* @param msg to output
*/
default void error(final String msg) {
getLogger().error(msg);
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical

if (logger.debug()) {
logger.warn("Not handing x-property " + xname);

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical

logger.warn("Odd character  in description: " +
bwstr.getValue());
} catch (Throwable t) {
logger.error(t);

代码示例来源:origin: org.bedework/bw-util-servlet

/** Returns the String url from the request.
*
* @param request incoming request
* @return String url from the request
*/
public static String getUrl(final HttpServletRequest request) {
try {
final StringBuffer sb = request.getRequestURL();
if (sb != null) {
return sb.toString();
}
// Presumably portlet - see what happens with uri
return request.getRequestURI();
} catch (Throwable t) {
logger.warn("Unable to get url from " + request);
return "BogusURL.this.is.probably.a.portal";
}
}

代码示例来源:origin: org.bedework/bw-util-logging

/**
* @param msg to output
*/
default void debug(final String msg) {
getLogger().debug(msg);
}

代码示例来源:origin: org.bedework/bw-util-logging

default void setLoggerClass(final Class cl) {
getLogger().setLoggedClass(cl);
}

代码示例来源:origin: org.bedework/bw-util-hibernate

if (getLogger().isDebugEnabled()) {
getLogger().debug("Enter rollback");
if (getLogger().isDebugEnabled()) {
getLogger().debug("About to rollback");

代码示例来源:origin: org.bedework/bw-util-logging

/**
* @param t exception
*/
default void error(final Throwable t) {
getLogger().error(t);
}

代码示例来源:origin: org.bedework/bw-util-logging

/**
* @param msg to output
*/
default void warn(final String msg) {
getLogger().warn(msg);
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@Override
public BwLogger getLogger() {
if ((logger.getLoggedClass() == null) && (logger.getLoggedName() == null)) {
logger.setLoggedClass(getClass());
}
return logger;
}
}

代码示例来源:origin: org.bedework/bw-caldav-util

if ((bnp == null) ||
(n.getNotification() != null)) {
new BwLogger().setLoggedClass(Parser.class).
error("No parser to handle " + curnode);
return null;

代码示例来源:origin: org.bedework/bw-caldav-util

/**
* @param f
*/
public static void dumpFilter(final FilterType f) {
logger.debug("");
dumpCompFilter(f.getCompFilter(), " ");
logger.debug("
");
}

代码示例来源:origin: org.bedework/bw-util-logging

/**
* @param msg to output
*/
default void error(final String msg,
final Throwable t) {
getLogger().error(msg, t);
}

推荐阅读
author-avatar
仇顺嵐
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有