Ganymede Log4j Eclipse Viewer(转)

上一篇 / 下一篇  2014-12-23 13:08:07 / 个人分类:Selenium2

Ganymede Log4j Eclipse Viewer

 原文地址:http://yangzb.iteye.com/blog/257646

  1. Installation
  2. Log4j Configuration
  3. Usage
  4. Quick Filtering
  5. Advanced Filtering
  6. Screenshots

Ganymede is an Eclipse plug-in that allows log4j messages to be displayed within a view. This view can be used to quickly and easily view and filter logging messages. The plug-in captures the log messages on a socket and displays them in a view that can be docked or hidden in a fast-view.

Eclipse Update Site:

To access the update site for the Ganymede project create an update site for Ganymede and provide it the url: http://ganymede.sf.net/update .

Log4j Configuration

Ganymede listens on a socket for log4j SocketAppenders.  To use Ganymede you must have your log4j environment set up to append to such a SocketAppender.  Ganymede listens by default on port 4445, so it is easiest to add a socket appender to your log4j configuration to write to 4445, but you may also change the port in the Ganymede preferences if you wish.  Below are examples of appender stanzas.

XML Format

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
 
 <appender name="Ganymede" class="org.apache.log4j.net.SocketAppender">
    <param name="remoteHost" value="localhost"/>
    <param name="port" value="4445"/>
    <param name="locationInfo" value="true"/>
  </appender>
  
  <root>
    <priority value="debug"/>
    <appender-ref ref="Ganymede"/>
  </root>
	
</log4j:configuration>

Properties Format

log4j.rootCategory=DEBUG, Ganymede

log4j.appender.Ganymede=org.apache.log4j.net.SocketAppender
log4j.appender.Ganymede.remoteHost=localhost
log4j.appender.Ganymede.port=4445
log4j.appender.Ganymede.locationInfo=true

TAG:

 

评分:0

我来说两句

Open Toolbar