亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? htmllayout.java

?? log4j的源碼
?? JAVA
字號:
/* * Copyright 1999-2005 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.log4j;import org.apache.log4j.spi.LoggingEvent;import org.apache.log4j.spi.LocationInfo;import org.apache.log4j.helpers.Transform;/**   This layout outputs events in a HTML table.   @author Ceki G&uuml;lc&uuml; */public class HTMLLayout extends Layout {  protected final int BUF_SIZE = 256;  protected final int MAX_CAPACITY = 1024;  static String TRACE_PREFIX = "<br>&nbsp;&nbsp;&nbsp;&nbsp;";  // output buffer appended to when format() is invoked  private StringBuffer sbuf = new StringBuffer(BUF_SIZE);  /**     A string constant used in naming the option for setting the the     location information flag.  Current value of this string     constant is <b>LocationInfo</b>.     <p>Note that all option keys are case sensitive.     @deprecated Options are now handled using the JavaBeans paradigm.     This constant is not longer needed and will be removed in the     <em>near</em> term.  */  public static final String LOCATION_INFO_OPTION = "LocationInfo";  /**     A string constant used in naming the option for setting the the     HTML document title.  Current value of this string     constant is <b>Title</b>.  */  public static final String TITLE_OPTION = "Title";  // Print no location info by default  boolean locationInfo = false;  String title = "Log4J Log Messages";  /**     The <b>LocationInfo</b> option takes a boolean value. By     default, it is set to false which means there will be no location     information output by this layout. If the the option is set to     true, then the file name and line number of the statement     at the origin of the log statement will be output.     <p>If you are embedding this layout within an {@link     org.apache.log4j.net.SMTPAppender} then make sure to set the     <b>LocationInfo</b> option of that appender as well.   */  public  void setLocationInfo(boolean flag) {    locationInfo = flag;  }  /**     Returns the current value of the <b>LocationInfo</b> option.   */  public  boolean getLocationInfo() {    return locationInfo;  }  /**    The <b>Title</b> option takes a String value. This option sets the    document title of the generated HTML document.    <p>Defaults to 'Log4J Log Messages'.  */  public  void setTitle(String title) {    this.title = title;  }  /**     Returns the current value of the <b>Title</b> option.  */  public  String getTitle() {    return title;  } /**     Returns the content type output by this layout, i.e "text/html".  */  public  String getContentType() {    return "text/html";  }  /**     No options to activate.  */  public  void activateOptions() {  }  public  String format(LoggingEvent event) {    if(sbuf.capacity() > MAX_CAPACITY) {      sbuf = new StringBuffer(BUF_SIZE);    } else {      sbuf.setLength(0);    }    sbuf.append(Layout.LINE_SEP + "<tr>" + Layout.LINE_SEP);    sbuf.append("<td>");    sbuf.append(event.timeStamp - event.getStartTime());    sbuf.append("</td>" + Layout.LINE_SEP);    sbuf.append("<td title=\"" + event.getThreadName() + " thread\">");    sbuf.append(Transform.escapeTags(event.getThreadName()));    sbuf.append("</td>" + Layout.LINE_SEP);    sbuf.append("<td title=\"Level\">");    if (event.getLevel().equals(Level.DEBUG)) {      sbuf.append("<font color=\"#339933\">");      sbuf.append(event.getLevel());      sbuf.append("</font>");    }    else if(event.getLevel().isGreaterOrEqual(Level.WARN)) {      sbuf.append("<font color=\"#993300\"><strong>");      sbuf.append(event.getLevel());      sbuf.append("</strong></font>");    } else {      sbuf.append(event.getLevel());    }    sbuf.append("</td>" + Layout.LINE_SEP);    sbuf.append("<td title=\"" + event.getLoggerName() + " category\">");    sbuf.append(Transform.escapeTags(event.getLoggerName()));    sbuf.append("</td>" + Layout.LINE_SEP);    if(locationInfo) {      LocationInfo locInfo = event.getLocationInformation();      sbuf.append("<td>");      sbuf.append(Transform.escapeTags(locInfo.getFileName()));      sbuf.append(':');      sbuf.append(locInfo.getLineNumber());      sbuf.append("</td>" + Layout.LINE_SEP);    }    sbuf.append("<td title=\"Message\">");    sbuf.append(Transform.escapeTags(event.getRenderedMessage()));    sbuf.append("</td>" + Layout.LINE_SEP);    sbuf.append("</tr>" + Layout.LINE_SEP);    if (event.getNDC() != null) {      sbuf.append("<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">");      sbuf.append("NDC: " + Transform.escapeTags(event.getNDC()));      sbuf.append("</td></tr>" + Layout.LINE_SEP);    }    String[] s = event.getThrowableStrRep();    if(s != null) {      sbuf.append("<tr><td bgcolor=\"#993300\" style=\"color:White; font-size : xx-small;\" colspan=\"6\">");      appendThrowableAsHTML(s, sbuf);      sbuf.append("</td></tr>" + Layout.LINE_SEP);    }    return sbuf.toString();  }  void appendThrowableAsHTML(String[] s, StringBuffer sbuf) {    if(s != null) {      int len = s.length;      if(len == 0)	return;      sbuf.append(Transform.escapeTags(s[0]));      sbuf.append(Layout.LINE_SEP);      for(int i = 1; i < len; i++) {	sbuf.append(TRACE_PREFIX);	sbuf.append(Transform.escapeTags(s[i]));	sbuf.append(Layout.LINE_SEP);      }    }  }  /**     Returns appropriate HTML headers.  */  public  String getHeader() {    StringBuffer sbuf = new StringBuffer();    sbuf.append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"  + Layout.LINE_SEP);    sbuf.append("<html>" + Layout.LINE_SEP);    sbuf.append("<head>" + Layout.LINE_SEP);    sbuf.append("<title>" + title + "</title>" + Layout.LINE_SEP);    sbuf.append("<style type=\"text/css\">"  + Layout.LINE_SEP);    sbuf.append("<!--"  + Layout.LINE_SEP);    sbuf.append("body, table {font-family: arial,sans-serif; font-size: x-small;}" + Layout.LINE_SEP);    sbuf.append("th {background: #336699; color: #FFFFFF; text-align: left;}" + Layout.LINE_SEP);    sbuf.append("-->" + Layout.LINE_SEP);    sbuf.append("</style>" + Layout.LINE_SEP);    sbuf.append("</head>" + Layout.LINE_SEP);    sbuf.append("<body bgcolor=\"#FFFFFF\" topmargin=\"6\" leftmargin=\"6\">" + Layout.LINE_SEP);    sbuf.append("<hr size=\"1\" noshade>" + Layout.LINE_SEP);    sbuf.append("Log session start time " + new java.util.Date() + "<br>" + Layout.LINE_SEP);    sbuf.append("<br>" + Layout.LINE_SEP);    sbuf.append("<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" bordercolor=\"#224466\" width=\"100%\">" + Layout.LINE_SEP);    sbuf.append("<tr>" + Layout.LINE_SEP);    sbuf.append("<th>Time</th>" + Layout.LINE_SEP);    sbuf.append("<th>Thread</th>" + Layout.LINE_SEP);    sbuf.append("<th>Level</th>" + Layout.LINE_SEP);    sbuf.append("<th>Category</th>" + Layout.LINE_SEP);    if(locationInfo) {      sbuf.append("<th>File:Line</th>" + Layout.LINE_SEP);    }    sbuf.append("<th>Message</th>" + Layout.LINE_SEP);    sbuf.append("</tr>" + Layout.LINE_SEP);    return sbuf.toString();  }  /**     Returns the appropriate HTML footers.  */  public  String getFooter() {    StringBuffer sbuf = new StringBuffer();    sbuf.append("</table>" + Layout.LINE_SEP);    sbuf.append("<br>" + Layout.LINE_SEP);    sbuf.append("</body></html>");    return sbuf.toString();  }  /**     The HTML layout handles the throwable contained in logging     events. Hence, this method return <code>false</code>.  */  public  boolean ignoresThrowable() {    return false;  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内成人自拍视频| 国产精品不卡一区| 久久综合九色综合97婷婷| 精品国产乱码久久久久久蜜臀 | 一片黄亚洲嫩模| 亚洲狠狠爱一区二区三区| 日韩精品国产精品| 国产高清在线观看免费不卡| 91亚洲男人天堂| 欧美喷水一区二区| 国产亚洲综合在线| 亚洲综合网站在线观看| 免费不卡在线观看| 成人免费av网站| 欧美日韩国产在线观看| 久久久久亚洲蜜桃| 亚洲精品成人悠悠色影视| 久久精品99国产国产精| 99久久精品免费| 欧美成人伊人久久综合网| 中文字幕一区二区三区在线播放 | 91成人免费电影| 精品国产乱码久久久久久蜜臀| 国产精品美女一区二区在线观看| 婷婷成人综合网| 成人免费不卡视频| 91精品国产全国免费观看| 国产精品久久久久久久裸模| 日韩黄色片在线观看| 不卡的电视剧免费网站有什么| 欧美日韩国产大片| 国产精品成人一区二区三区夜夜夜| 午夜精品久久久久久久久久| 成人av网站免费| 日韩一区二区高清| 亚洲一区二区三区影院| 国产福利91精品| 日韩欧美在线网站| 一区二区在线观看视频在线观看| 国产在线精品一区二区夜色| 欧美亚洲愉拍一区二区| 亚洲国产成人午夜在线一区| 蜜臀a∨国产成人精品| 91无套直看片红桃| 亚洲国产精品黑人久久久| 蜜臀av性久久久久蜜臀aⅴ| 在线中文字幕一区二区| 亚洲欧洲日产国码二区| 国产精品一区在线观看你懂的| 欧美人成免费网站| 亚洲欧美一区二区不卡| 国产成a人无v码亚洲福利| 欧美一级欧美三级在线观看| 一区二区三国产精华液| 成人h版在线观看| 久久人人爽人人爽| 久久 天天综合| 欧美一区二区三区视频免费播放| 一区二区三区精品| 99精品桃花视频在线观看| 国产日产欧美一区| 韩国一区二区三区| 日韩美女天天操| 蜜桃视频一区二区三区在线观看| 欧美日韩五月天| 一区二区在线看| 色狠狠色狠狠综合| 亚洲色图在线播放| 色婷婷综合久久| 亚洲精品日韩一| 色一情一伦一子一伦一区| 亚洲欧美在线另类| av在线这里只有精品| 国产精品美女视频| 成人av网站免费观看| 国产精品传媒视频| 色天使久久综合网天天| 亚洲免费在线播放| 欧美无乱码久久久免费午夜一区| 一区二区三区av电影| 欧美日韩一区二区三区四区| 香蕉成人伊视频在线观看| 欧美日韩和欧美的一区二区| 亚洲国产cao| 91精品国产一区二区| 久久99精品国产麻豆婷婷| 久久久精品黄色| 高清国产一区二区| 亚洲欧洲一区二区在线播放| 日本久久一区二区三区| 亚洲午夜在线电影| 6080国产精品一区二区| 久久99久久99精品免视看婷婷| 久久综合色天天久久综合图片| 国产福利91精品| 自拍av一区二区三区| 日本丶国产丶欧美色综合| 亚洲自拍偷拍综合| 日韩亚洲电影在线| 国产毛片精品视频| 18成人在线观看| 欧美在线影院一区二区| 视频一区视频二区在线观看| 日韩一区二区在线看片| 国内精品免费**视频| 国产精品三级久久久久三级| 91电影在线观看| 久久国产三级精品| 国产精品少妇自拍| 在线免费亚洲电影| 老色鬼精品视频在线观看播放| 欧美激情综合五月色丁香| 色av成人天堂桃色av| 日本特黄久久久高潮| 中文一区二区完整视频在线观看| 色综合网站在线| 日韩在线观看一区二区| 久久精品人人做| 91国内精品野花午夜精品| 久久精品理论片| 日韩伦理电影网| 欧美一区二区在线看| yourporn久久国产精品| 日韩在线a电影| 国产精品高潮呻吟久久| 4438x亚洲最大成人网| 成人一区二区三区中文字幕| 亚洲一区二区精品久久av| 精品99久久久久久| 在线观看网站黄不卡| 国产一区二区毛片| 一区二区三区高清在线| 久久久久国产精品免费免费搜索| 色一区在线观看| 国产成人亚洲综合a∨婷婷图片| 亚洲综合偷拍欧美一区色| 欧美xxx久久| 精品视频全国免费看| 丁香天五香天堂综合| 日韩av电影免费观看高清完整版 | 国产91精品入口| 日韩精品一二三区| 亚洲色图另类专区| 精品裸体舞一区二区三区| 欧美性做爰猛烈叫床潮| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲丰满少妇videoshd| 欧美激情一区二区三区四区| 91精品婷婷国产综合久久| 91色porny蝌蚪| 国产精品一二三| 蜜桃精品在线观看| 亚洲一区中文在线| 国产精品成人一区二区三区夜夜夜| 日韩精品一区二区三区四区| 欧美午夜一区二区三区免费大片| 成人性生交大片免费| 久久97超碰色| 蜜桃视频第一区免费观看| 亚洲图片欧美视频| 亚洲少妇最新在线视频| 国产日韩欧美a| xvideos.蜜桃一区二区| 日韩亚洲欧美高清| 56国语精品自产拍在线观看| 色婷婷激情一区二区三区| 成人黄色免费短视频| 国产乱码一区二区三区| 蜜桃视频一区二区三区| 日本美女视频一区二区| 一区二区三区蜜桃网| 亚洲欧美福利一区二区| 最新不卡av在线| 国产精品久久久久aaaa樱花| 国产日韩欧美精品综合| 久久久亚洲午夜电影| 日韩精品在线一区| 欧美一级生活片| 日韩精品一区二区三区视频播放| 欧美一区二区三区不卡| 欧美另类变人与禽xxxxx| 欧美日韩三级一区二区| 亚洲免费观看高清完整版在线观看 | 中文字幕中文字幕一区二区 | 91亚洲永久精品| 91麻豆福利精品推荐| 一本一本久久a久久精品综合麻豆| 不卡av电影在线播放| 97精品超碰一区二区三区| 91网页版在线| 在线亚洲欧美专区二区| 欧美午夜免费电影| 在线成人av网站| 欧美大度的电影原声| 精品国产免费人成电影在线观看四季 | 亚洲色大成网站www久久九九| 国产精品久久网站| 国产精品人成在线观看免费| 中文字幕亚洲一区二区va在线| 国产精品看片你懂得|