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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? htmllayout.java

?? apache的log4j源碼
?? JAVA
字號(hào):
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. * * Appenders using this layout should have their encoding * set to UTF-8 or UTF-16, otherwise events containing * non ASCII characters could result in corrupted * log files. * *  @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 - LoggingEvent.getStartTime());    sbuf.append("</td>" + Layout.LINE_SEP);    String escapedThread = Transform.escapeTags(event.getThreadName());    sbuf.append("<td title=\"" + escapedThread + " thread\">");    sbuf.append(escapedThread);    sbuf.append("</td>" + Layout.LINE_SEP);    sbuf.append("<td title=\"Level\">");    if (event.getLevel().equals(Level.DEBUG)) {      sbuf.append("<font color=\"#339933\">");      sbuf.append(Transform.escapeTags(String.valueOf(event.getLevel())));      sbuf.append("</font>");    }    else if(event.getLevel().isGreaterOrEqual(Level.WARN)) {      sbuf.append("<font color=\"#993300\"><strong>");      sbuf.append(Transform.escapeTags(String.valueOf(event.getLevel())));      sbuf.append("</strong></font>");    } else {      sbuf.append(Transform.escapeTags(String.valueOf(event.getLevel())));    }    sbuf.append("</td>" + Layout.LINE_SEP);    String escapedLogger = Transform.escapeTags(event.getLoggerName());    sbuf.append("<td title=\"" + escapedLogger + " category\">");    sbuf.append(escapedLogger);    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;  }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
gogo大胆日本视频一区| 国产精品69毛片高清亚洲| 国产福利电影一区二区三区| 在线免费观看日韩欧美| 国产色产综合产在线视频| 午夜精品一区二区三区电影天堂 | 午夜激情一区二区| 波多野结衣视频一区| 精品粉嫩aⅴ一区二区三区四区 | 久久久亚洲精华液精华液精华液| 一区二区三区在线观看网站| 777亚洲妇女| 亚洲国产你懂的| 成人激情小说网站| 久久久高清一区二区三区| 蜜桃精品在线观看| 欧美日韩黄色一区二区| 亚洲免费视频成人| 成人av午夜影院| 国产亚洲成年网址在线观看| 精品一区二区三区影院在线午夜| 欧美精品三级在线观看| 亚洲免费在线视频一区 二区| 大白屁股一区二区视频| 精品福利一二区| 免费成人av在线播放| 欧美男女性生活在线直播观看| 亚洲激情五月婷婷| 91丨porny丨中文| 中文字幕日韩av资源站| 成人综合婷婷国产精品久久 | 制服丝袜日韩国产| 婷婷中文字幕综合| 欧美日韩午夜在线视频| 一区二区三区电影在线播| 91小视频在线免费看| **性色生活片久久毛片| 91丝袜国产在线播放| 国产精品国产三级国产aⅴ原创| 国产91精品一区二区麻豆亚洲| 久久精品综合网| 国产成人欧美日韩在线电影| 久久麻豆一区二区| 国产成人精品一区二| 国产日韩精品一区二区浪潮av | 免费欧美在线视频| 日韩一区二区高清| 美女视频黄 久久| 精品久久久久久久人人人人传媒| 麻豆成人免费电影| 欧美一级片在线| 视频在线在亚洲| 日韩一区二区三区在线观看| 免费久久精品视频| 欧美精品一区二区三区视频| 国模少妇一区二区三区| 国产日韩欧美精品电影三级在线 | 亚洲成人免费观看| 欧美欧美欧美欧美| 久久99国产精品久久99 | 欧美日韩黄视频| 久久精品国产亚洲5555| 亚洲精品一区二区三区在线观看 | 欧美精品日韩一区| 日本欧美加勒比视频| 精品国产区一区| 成人免费黄色大片| 一区二区三区在线播| 7878成人国产在线观看| 国产美女在线观看一区| 日韩伦理免费电影| 欧美日韩成人在线一区| 激情综合色丁香一区二区| 国产欧美日本一区二区三区| 一本一道综合狠狠老| 性久久久久久久久| 精品国产区一区| 99精品久久99久久久久| 亚洲va天堂va国产va久| 精品国产精品网麻豆系列| 丁香六月久久综合狠狠色| 一区二区三区资源| 日韩一级精品视频在线观看| 成人午夜免费电影| 亚洲一级片在线观看| 精品久久人人做人人爽| 91在线精品秘密一区二区| 无吗不卡中文字幕| 国产午夜精品福利| 欧美视频在线一区| 国产一区在线看| 亚洲精品乱码久久久久久| 欧美一区二视频| 成人av电影免费观看| 天天爽夜夜爽夜夜爽精品视频| xnxx国产精品| 91电影在线观看| 国产精品18久久久久久久网站| 亚洲视频在线一区| 精品女同一区二区| 91黄色免费版| 国产精品一区二区无线| 亚洲电影一区二区| 欧美激情一区二区三区在线| 欧美日韩高清一区二区| 成人污污视频在线观看| 日韩精品午夜视频| 亚洲欧美一区二区三区国产精品 | 51精品秘密在线观看| 国产精品一区二区久激情瑜伽| 亚洲综合色婷婷| 中文字幕免费一区| 日韩视频一区二区三区在线播放| 91色在线porny| 国产精品影音先锋| 日韩成人午夜电影| 一区二区三区四区在线免费观看| 久久久综合精品| 日韩西西人体444www| 色久优优欧美色久优优| 精品日韩欧美在线| 欧美日韩一区三区四区| 91在线视频网址| 国产成人免费视频网站| 蜜桃视频第一区免费观看| 一区二区三区在线看| 国产精品不卡在线观看| 26uuu色噜噜精品一区二区| 欧美美女一区二区在线观看| 972aa.com艺术欧美| 丁香天五香天堂综合| 精品一区二区三区在线视频| 日韩av电影免费观看高清完整版在线观看| 亚洲欧美激情在线| 国产精品福利在线播放| 国产日韩av一区| 精品成人在线观看| 日韩欧美中文字幕公布| 欧美日韩国产在线播放网站| 色综合天天综合在线视频| 国产麻豆精品在线| 久久91精品国产91久久小草| 蜜桃一区二区三区在线| 日韩av一级电影| 日韩精品乱码免费| 偷拍亚洲欧洲综合| 亚洲福利视频导航| 亚洲综合另类小说| 亚洲一区二区在线视频| 一区二区三区国产| 亚洲午夜精品网| 亚洲不卡在线观看| 亚洲成人av在线电影| 亚洲国产一二三| 亚洲一区二区欧美| 亚洲一二三专区| 亚洲va在线va天堂| 三级久久三级久久久| 五月婷婷综合网| 日韩精品久久久久久| 日本中文字幕不卡| 美女尤物国产一区| 国产一区欧美一区| 国产suv精品一区二区三区| 高清国产一区二区三区| 99精品视频在线观看| 91在线码无精品| 欧美色成人综合| 欧美一级一区二区| 欧美精品一区二区久久久| 久久久久久久电影| 国产精品久久久爽爽爽麻豆色哟哟| 国产精品美女久久久久久久| 亚洲图片欧美激情| 亚洲综合色噜噜狠狠| 日韩福利视频网| 国产一区二区在线看| 成人网在线免费视频| 91浏览器在线视频| 欧美日韩高清一区二区不卡| 日韩精品一区国产麻豆| 久久久久久麻豆| 国产精品福利影院| 午夜精品在线看| 国内精品国产成人| 91麻豆国产在线观看| 欧美日韩aaaaa| 久久精品日韩一区二区三区| 中文字幕视频一区| 亚洲va韩国va欧美va精品| 精品一区二区三区在线播放| 成人精品高清在线| 欧美日韩在线综合| 久久婷婷色综合| 亚洲欧洲日本在线| 视频一区二区三区中文字幕| 国产裸体歌舞团一区二区| 色综合久久中文综合久久97| 777午夜精品免费视频| 久久久99精品久久|