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

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

?? lf5appender.java

?? apache的log4j源碼
?? JAVA
字號:
/* * 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.lf5;import org.apache.log4j.lf5.util.Resource;import org.apache.log4j.lf5.viewer.LogBrokerMonitor;import org.apache.log4j.AppenderSkeleton;import org.apache.log4j.spi.LocationInfo;import org.apache.log4j.spi.LoggingEvent;import java.awt.*;/** * <code>LF5Appender</code> logs events to a swing based logging * console. The swing console supports turning categories on and off, * multiple detail level views, as well as full text searching and many * other capabilties. * * @author Brent Sprecher */// Contributed by ThoughtWorks Inc.public class LF5Appender extends AppenderSkeleton {  //--------------------------------------------------------------------------  // Constants:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  // Protected Variables:  //--------------------------------------------------------------------------  protected LogBrokerMonitor _logMonitor;  protected static LogBrokerMonitor _defaultLogMonitor;  protected static AppenderFinalizer _finalizer;  //--------------------------------------------------------------------------  // Private Variables:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  // Constructors:  //--------------------------------------------------------------------------  /**   * Constructs a <code>LF5Appender</code> using the default instance of   * the <code>LogBrokerMonitor</code>. This constructor should <bold>always   * </bold> be  preferred over the   * <code>LF5Appender(LogBrokerMonitor monitor)</code>   * constructor, unless you need to spawn additional log monitoring   * windows.   */  public LF5Appender() {    this(getDefaultInstance());  }  /**   * Constructs a <code>LF5Appender<code> using an instance of   * a <code>LogBrokerMonitor<code> supplied by the user. This   * constructor should only be used when you need to spawn   * additional log monitoring windows.   *   * @param monitor An instance of a <code>LogBrokerMonitor<code>   * created by the user.   */  public LF5Appender(LogBrokerMonitor monitor) {    if (monitor != null) {      _logMonitor = monitor;    }  }  //--------------------------------------------------------------------------  // Public Methods:  //--------------------------------------------------------------------------  /**   * Appends a <code>LoggingEvent</code> record to the   * <code>LF5Appender</code>.   * @param event The <code>LoggingEvent</code>   * to be appended.   */  public void append(LoggingEvent event) {    // Retrieve the information from the log4j LoggingEvent.    String category = event.getLoggerName();    String logMessage = event.getRenderedMessage();    String nestedDiagnosticContext = event.getNDC();    String threadDescription = event.getThreadName();    String level = event.getLevel().toString();    long time = event.timeStamp;    LocationInfo locationInfo = event.getLocationInformation();    // Add the logging event information to a LogRecord    Log4JLogRecord record = new Log4JLogRecord();    record.setCategory(category);    record.setMessage(logMessage);    record.setLocation(locationInfo.fullInfo);    record.setMillis(time);    record.setThreadDescription(threadDescription);    if (nestedDiagnosticContext != null) {      record.setNDC(nestedDiagnosticContext);    } else {      record.setNDC("");    }    if (event.getThrowableInformation() != null) {      record.setThrownStackTrace(event.getThrowableInformation());    }    try {      record.setLevel(LogLevel.valueOf(level));    } catch (LogLevelFormatException e) {      // If the priority level doesn't match one of the predefined      // log levels, then set the level to warning.      record.setLevel(LogLevel.WARN);    }    if (_logMonitor != null) {      _logMonitor.addMessage(record);    }  }  /**   * This method is an empty implementation of the close() method inherited   * from the <code>org.apache.log4j.Appender</code> interface.   */  public void close() {  }  /**   * Returns a value that indicates whether this appender requires a   * <code>Layout</code>. This method always returns false.   * No layout is required for the <code>LF5Appender</code>.   */  public boolean requiresLayout() {    return false;  }  /**   * This method is used to set the property that controls whether   * the <code>LogBrokerMonitor</code> is hidden or closed when a user   * exits   * the monitor. By default, the <code>LogBrokerMonitor</code> will hide   * itself when the log window is exited, and the swing thread will   * continue to run in the background. If this property is   * set to true, the <code>LogBrokerMonitor</code> will call System.exit(0)   * and will shut down swing thread and the virtual machine.   *   * @param callSystemExitOnClose A boolean value indicating whether   * to call System.exit(0) when closing the log window.   */  public void setCallSystemExitOnClose(boolean callSystemExitOnClose) {    _logMonitor.setCallSystemExitOnClose(callSystemExitOnClose);  }  /**   * The equals method compares two LF5Appenders and determines whether   * they are equal. Two <code>Appenders</code> will be considered equal   * if, and only if, they both contain references to the same <code>   * LogBrokerMonitor</code>.   *   * @param compareTo A boolean value indicating whether   * the two LF5Appenders are equal.   */  public boolean equals(LF5Appender compareTo) {    // If both reference the same LogBrokerMonitor, they are equal.    return _logMonitor == compareTo.getLogBrokerMonitor();  }  public LogBrokerMonitor getLogBrokerMonitor() {    return _logMonitor;  }  public static void main(String[] args) {    new LF5Appender();  }  public void setMaxNumberOfRecords(int maxNumberOfRecords) {    _defaultLogMonitor.setMaxNumberOfLogRecords(maxNumberOfRecords);  }  //--------------------------------------------------------------------------  // Protected Methods:  //--------------------------------------------------------------------------  /**   * @return The default instance of the <code>LogBrokerMonitor</code>.   */  protected static synchronized LogBrokerMonitor getDefaultInstance() {    if (_defaultLogMonitor == null) {      try {        _defaultLogMonitor =            new LogBrokerMonitor(LogLevel.getLog4JLevels());        _finalizer = new AppenderFinalizer(_defaultLogMonitor);        _defaultLogMonitor.setFrameSize(getDefaultMonitorWidth(),            getDefaultMonitorHeight());        _defaultLogMonitor.setFontSize(12);        _defaultLogMonitor.show();      } catch (SecurityException e) {        _defaultLogMonitor = null;      }    }    return _defaultLogMonitor;  }  /**   * @return the screen width from Toolkit.getScreenSize()   * if possible, otherwise returns 800   * @see java.awt.Toolkit   */  protected static int getScreenWidth() {    try {      return Toolkit.getDefaultToolkit().getScreenSize().width;    } catch (Throwable t) {      return 800;    }  }  /**   * @return the screen height from Toolkit.getScreenSize()   * if possible, otherwise returns 600   * @see java.awt.Toolkit   */  protected static int getScreenHeight() {    try {      return Toolkit.getDefaultToolkit().getScreenSize().height;    } catch (Throwable t) {      return 600;    }  }  protected static int getDefaultMonitorWidth() {    return (3 * getScreenWidth()) / 4;  }  protected static int getDefaultMonitorHeight() {    return (3 * getScreenHeight()) / 4;  }  //--------------------------------------------------------------------------  // Private Methods:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  // Nested Top-Level Classes or Interfaces:  //--------------------------------------------------------------------------}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区在线播放| 亚洲午夜久久久久久久久久久| 国产精品美女久久福利网站 | 午夜精品免费在线| 国产成人综合亚洲91猫咪| 欧美性生活久久| 亚洲精品一区二区三区香蕉| 亚洲美女少妇撒尿| 国产高清亚洲一区| 欧美一区二区三区四区高清| 亚洲美女淫视频| 99视频有精品| 国产精品毛片高清在线完整版| 六月婷婷色综合| 欧美三级视频在线| 亚洲女人小视频在线观看| 国产精品18久久久久久久网站| 日韩一区二区三区在线视频| 一区二区三区精品在线| 99久久精品久久久久久清纯| 久久久久久久久一| 国产一区二区三区免费观看| 日韩一级大片在线观看| 日韩精品电影在线观看| 欧美精品一二三区| 日韩中文欧美在线| 91麻豆精品国产| 秋霞电影网一区二区| 欧美日本一区二区三区四区| 亚洲成人免费电影| 欧美人狂配大交3d怪物一区| 性欧美大战久久久久久久久| 欧美日韩国产色站一区二区三区| 亚洲乱码中文字幕综合| 色屁屁一区二区| 亚洲综合色视频| 欧美日韩国产综合草草| 免费成人美女在线观看.| 欧美v国产在线一区二区三区| 激情图区综合网| 国产三级久久久| 91视频观看视频| 亚洲午夜影视影院在线观看| 欧美剧情片在线观看| 美女免费视频一区二区| 久久免费的精品国产v∧| 国产精品18久久久久久vr| 久久久久久麻豆| 91首页免费视频| 日韩国产在线观看一区| 91精品欧美久久久久久动漫| 开心九九激情九九欧美日韩精美视频电影| 日韩一级视频免费观看在线| 国产乱人伦偷精品视频免下载| 欧美韩国一区二区| 欧美专区日韩专区| 久久精品国产免费| 中文字幕一区二区日韩精品绯色| 91捆绑美女网站| 日韩电影在线免费| 欧美国产日韩一二三区| 一本一道综合狠狠老| 青青草原综合久久大伊人精品 | 国产精品国产自产拍高清av| 色素色在线综合| 久久er99热精品一区二区| 中文字幕不卡在线观看| 欧美日韩成人高清| 国产91色综合久久免费分享| 亚洲一区在线观看网站| 久久久久久久久久看片| 欧美亚洲国产bt| 久久精品99久久久| 亚洲精品伦理在线| 26uuu另类欧美亚洲曰本| 色欧美片视频在线观看| 国产一区二区三区四区五区入口| 一个色在线综合| 久久精品视频一区二区| 欧美精品在线观看播放| 色综合天天做天天爱| 精品一区精品二区高清| 亚洲国产精品人人做人人爽| 国产三级精品三级在线专区| 欧美一区二区三区在线| 91精彩视频在线| 国产精品1024久久| 捆绑调教一区二区三区| 五月天中文字幕一区二区| 国产精品的网站| 久久久久99精品国产片| 欧美一区二区三区视频| 欧日韩精品视频| 91视频免费播放| 成+人+亚洲+综合天堂| 国产在线视视频有精品| 青草国产精品久久久久久| 亚洲最新视频在线播放| 亚洲欧美在线另类| 亚洲国产成人自拍| 久久精品视频网| 久久久久久久综合色一本| 精品国产一区久久| 精品国精品国产尤物美女| 69堂亚洲精品首页| 欧美猛男gaygay网站| 91行情网站电视在线观看高清版| 白白色亚洲国产精品| 成人网在线免费视频| 国产成人免费视频一区| 国产999精品久久久久久| 国产**成人网毛片九色| 国产成人综合亚洲网站| 丁香婷婷深情五月亚洲| 粉嫩13p一区二区三区| 国产成人一区在线| 成人午夜在线播放| 成人动漫精品一区二区| 97se亚洲国产综合自在线| 99国产精品国产精品毛片| 99v久久综合狠狠综合久久| 91丨九色丨蝌蚪丨老版| 色综合久久66| 欧美日韩国产123区| 欧美欧美欧美欧美首页| 日韩精品专区在线影院观看| 欧美精品一区二区三区蜜臀| 国产调教视频一区| **性色生活片久久毛片| 亚洲裸体在线观看| 婷婷开心久久网| 裸体歌舞表演一区二区| 国产a精品视频| 一本色道综合亚洲| 欧美精品一二三区| 久久精品在线观看| 国产精品动漫网站| 亚洲成av人片一区二区| 日本欧美肥老太交大片| 国产麻豆精品在线观看| 99国产麻豆精品| 91精品国产色综合久久不卡电影| 欧美电影免费观看高清完整版在线观看| 精品久久一区二区三区| 中文字幕一区二区三区不卡| 亚洲成人中文在线| 久久69国产一区二区蜜臀| www.视频一区| 欧美日韩和欧美的一区二区| 国产亚洲自拍一区| 亚洲一区二区精品久久av| 激情五月婷婷综合| 色美美综合视频| 欧美不卡一区二区三区| 亚洲人亚洲人成电影网站色| 免费成人深夜小野草| 97久久久精品综合88久久| 91精品国产综合久久久久久久久久| 久久久久久毛片| 午夜视频一区二区| 成人免费毛片片v| 欧美日韩国产a| 一区二区三区中文字幕电影| 久久99精品久久久久| 在线观看亚洲一区| 久久九九99视频| 日韩极品在线观看| 91丨九色丨黑人外教| 国产午夜精品久久久久久久| 亚洲成人一二三| 色婷婷精品久久二区二区蜜臀av| 欧美r级在线观看| 午夜精品久久久久久久久久久| 成人综合婷婷国产精品久久| 日韩视频免费观看高清完整版| 亚洲美女视频在线观看| 成人av在线网| 久久这里只精品最新地址| 日韩av不卡在线观看| 在线观看欧美日本| 中日韩av电影| 国产成人精品亚洲午夜麻豆| 日韩欧美高清一区| 日韩av一区二区三区四区| 欧美做爰猛烈大尺度电影无法无天| 中文字幕第一页久久| 国产盗摄女厕一区二区三区| 久久色视频免费观看| 久久精品国产一区二区三 | 色综合天天在线| 欧美激情一区二区三区全黄| 国产福利一区二区三区在线视频| 日韩精品一区二区三区在线| 秋霞午夜鲁丝一区二区老狼| 91精品一区二区三区久久久久久 | 精品久久久久久久久久久院品网| 五月天一区二区三区| 欧美精品高清视频| 日本大胆欧美人术艺术动态| 欧美精品在线一区二区|