BUG Community

Welcome! Log In

switch's Blog

Chainsaw HOWTO

Introduction

Welcome to the home of Chainsaw v2!

Chainsaw v2 is a companion application to Log4j written by members of the Log4j development community. Like a number of Open Source projects, this new version was built upon inspirations, ideas and creations of others. Chainsaw v2 has it's roots from the original Chainsaw utility written by Oliver Burn, and with inspiration from the Log Factor 5 utility contributed by ThoughtWorks Inc.

Available Distributions

  • Java Web Start

  • Standalone -.sh/.bat

  • OS X 'native' distribution (uses Java still, but looks like a real OSX application)

    Click Download link for more information.

So what is it really?

 

 

Heres just a brief run down of some of the features of Chainsaw v2:

  • View remote events - Remote events are "received" by Chainsaw using Log4j 1.3's new Receiver concept.

  • Saved Preferences - You can fully customize each Tab the way you want it, and it will restore it's state the next time.

  • Responsive - When events are screaming in, you don't want the GUI to meltdown. You can control how responsive the GUI is and determine the frequency of updates.

  • Tabs/Docking - Chainsaw routes separate applications/remote hosts' events to a unique Tab within the GUI. These tabs can be undocked from the main window. Using these features you can manage multiple application logs using the one GUI.

  • Coloring - You can specify your own rules to color each event row depending on the attributes of a LoggingEvent to help you locate important events.

  • Dynamic and powerful filtering - Helps you locate stuff. There's support for quick-and-dirty filtering, right through to advanced expression-based filtering (e.g. "LOGGER == 'com.mycompany' && LEVEL == ERROR" ).

  • Cyclic - A tab view can support a Cyclic-based model, which constrains it's view to the last X events, ensuring you don't hog memory. This is great for monitoring live applications.

  • Built-in documentation and tutorial - HTML-based documentation included in the package.

 

created on: 08/13/09

 

SO HOW DO WE GET THIS THING ONTO THE BUG ?

 

You can download chainsaw by itself here :

http://logging.apache.org/chainsaw/download.html

 

but if you intend to use it along with log4j and since you will probably also need to make a connection to a remote machine for viewing the logs,you may just download this log4j package that comes along with cahinsaw

and other goodies such as log4j.net that is useful for remote connection.

http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.15/apache-log4j-1.2.15.zip

 

In ether case, locate the jar file copy it to your project and add it to your project class path.

 

 

SETTING UP THE STAGE ON THE BUG .

 

Add the missing lines to your activator class:

 

import org.apache.log4j.BasicConfigurator;

import org.apache.log4j.Logger;

import org.apache.log4j.RollingFileAppender;

import org.apache.log4j.net.*;

 

public class Activator implements BundleActivator {

 

Logger activ = Logger.getLogger(Activator.class); // activator Logger

public static FileAppender log;

public static SocketAppender chainsaw_output;

/**

* This fonction only runs once when the application starts and sets up

* all that is required on the activator side..

*/

static {

BasicConfigurator.configure(); // allows standard output

try {

log = new RollingFileAppender(new PatternLayout("%r [%t] %-5p %c - %m%n"), "out.log");

chainsaw_output = new SocketAppender("127.0.0.1", 4445);// (“IP”,Port#)

} catch (IOException e) {e.printStackTrace();}

}

public Activator(){

LoggerRepository repository = activ.getLoggerRepository();

repository.setThreshold(Level.ALL);

activ.addAppender(log);

activ.addAppender(chainsaw_output); //allow the logs to be also sent to chainsaw

activ.debug("LOG4J activ Initialisation completed . . . ");

}

public void start(BundleContext context) throws Exception {

//Create the service tracker and run it.

stc = new log4jExampleServiceTracker(context);

Filter f = context.createFilter(ServiceFilterGenerator.generateServiceFilter(stc.getServices()));

st = new ServiceTracker(context, f, stc);

st.open();

activ.info("activator doing start");

}

}

 

 

since chainsaw_output is visible from anywhere within this project , you can send other logs to it by doing from other classes:

 

myOwnLogger.addAppender(projectName.Activator.chainsaw_output);

 

here is an example from my Service tracker class.

 

 

package log4jexample.servicetracker;

 

/**

* Generated by Dragonfly SDK

*/

 

import java.io.IOException;

import com.buglabs.bug.module.lcd.pub.IModuleDisplay;

import org.apache.log4j.Logger;

import org.osgi.framework.BundleContext;

import com.buglabs.application.AbstractServiceTracker;

import log4jexample.app.*;

 

 

public class log4jExampleServiceTracker extends AbstractServiceTracker {

 

private IModuleDisplay display;

final static Logger str = Logger.getLogger(log4jExampleServiceTracker.class);

 

public log4jExampleServiceTracker(BundleContext context) {

super(context);

str.addAppender(log4jexample.Activator.log);

str.addAppender(log4jexample.Activator.chainsaw_output);

str.debug("LOG4J str Initialisation completed . . . ");

}

public boolean canStart() {

str.info("doing can start");

return super.canStart();

}

public void doStart() {

str.info("starting doStart()");

System.out.println("log4jExampleServiceTracker: start");

display = (IModuleDisplay) getService(IModuleDisplay.class);

log4jExampleApp app;

app = new log4jExampleApp(display);

str.info("exiting doStart()");

}

 

public void doStop() {

System.out.println("log4jExampleServiceTracker: stop");

}

 

public void initServices() {

str.info("Setting up Services");

getServices().add("com.buglabs.bug.module.lcd.pub.IModuleDisplay");

}

}

 

this will allow the logs fro your own loggers from other classes to directly print into the chainsaw_output and be viewed on a remote machine.

 

The remote machine

 

in order to view the log on a remote machine, you need to have the chainsaw viewer installed and running.

You can get a copy of it at:

 

http://sourceforge.net/projects/logui/files/chainsaw/1.1/chainsaw-1.1.zip/download

 

unzip the file

locate chainsaw.sh

make it executable chmod 777 chainsaw.sh

then to lunch it just ./chainsaw.sh into the terminal given that you have it in your path.

 

Once you have the viewer running, consult the Built-in documentation and tutorial for more in dept information on how to use all the different features of chainsaw.

 

Post Comments

Add Your Comment!

Log in to leave a comment or Create an account

Paar Stunden oder einen day.So Geschrieben IST , war Sindh SEO Texte ? Sie sind Artikel Gesetz ��ber die betreffenden Michael Kors handbags outlet online store Thema Geschrieben . Zum beispiel , WENN SIE Michael Kors handbags VERKAUFEN Spielzeuge Sind DURCH
Wissen , und cheap michael kors color purses war Wie man gut mit Anderen speak und cheap Michael Kors bags usa Stellen Sicher SIE , Kompliment switch intelligente und Michael Kors online outlet modische Menschen. WENN Sie- out h ? Ngen Michael Kors Handbags Black Friday Sale mit Au -Modus ? Enseiter , Werden Sie [linlei0929] Auch
de awficers frum reich gempmum " discount Michael Kors purses statt Sumpf Papierkorb. " " Er wird nicht michael kors bag in den michael kors bags Papierkorb ! Haben Sie vor, ihn cheap Michael Kors bags online mit echten white trash , wie die

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Máy tập cơ bụng fitness

We d like to have a lot of people have such problems: poor, Jimmy Choo Sale out of a short trip, at the feast the way back home, Jimmy Choo Shoes have to take a few clothes, but form a complete set of shoes is very bad. Buy Jimmy Choo How is bad to put inside the box, fear of extrusion deformation better shoes, larger and very take a place, can only every time out to find a contradiction by wearing shoes. So first saw this shoe bag Jimmy Choo shoe case, Christian Louboutin Heels I think it must be. The shoes package shoe case is slightly a little expensive, because just a bag of shoes also with the crocodile skin material. Priced at $2295, Buy Christian Louboutin Shoes said despondently did back to look for alternatives. Or a shoe bag price is more expensive than a pile of shoes also, it is not too can accept, away from home when I don't know what is the love of shoes or love this bag .
louboutin uk

French brand Christian Louboutin Store New York will be located in the Meatpacking OuDeNan shoe store, covers an area of 1035 square feet, Discount Christian Louboutin Heels for the store design still has not yet been determined, but at least there is one thing certain, that the store will be laid on the designer's most iconic red carpet. Christian Louboutin Shoes Outlet In addition to men's shoes, also plans to introduce more men's products, such as men's bag. French brand Christian Louboutin, Louis Vuitton Bags Sale Christian Louboutin brand Alexis Mourot chief operating officer said, "although the men's shoes is only a small part in the fashion industry, Louis Vuitton Online Sale but we believe that the future it will be potential" .

Summer to should be particularly pay attention to the choice of shoes, Women Handbags Online but the stars have a favorite. Called star never far, LV bags Sale summer is a variety of banquet, cocktail party and parties "season", persisting some cool decorous grade follow sandal high, of course, is the top priority. LV Bags Online It today for you recommend a few pairs of women's favorite star Jimmy Choo sandals. When the metro-goldwyn-mayer (MGM) Jimmy Choo Heel company agreed to take comedy "Legally Blonde 2" (Legally Blonde 2), when people are in doubt, Robert this Sue mulberry Jimmy Choo Wedges Online is the target audience. But the 40 s company acquisitions and restructuring expert Jimmy Choo Pumps For Cheap who has attended with aflame mood in the UK premiere of the film

Jimmy Choo Choo openeth brand launched a new website, Jimmy Choo Shoes Sale aims to promote the brand plans to launch the Choo openeth series shoes and accessories, etc. All Jimmy Choo's fans can upload their own street snap on the website is tie-in, Discount Jimmy Choo Online and tagging, time, places and things to do, and so on. Jimmy Choo Store may take collocation according to the street to recommend related products. Of course the most important thing is to accept many net friends. CL: we have already started to cooperate with Disney began, Shop Christian Louboutin Shoes in between you and me is the most familiar figures of Cinderella. Who else can more love than Cinderella shoes fantastic characters? Buy Christian Louboutin Heels Now I can't give the information. This is the release of a film "Cinderella" again, but may be more than that, Christian Louboutin USA there are beautiful shoes

Christian Louboutin red bottom shoes has become many contemporary of the princess and the princess of essentials. Christian Louboutin Discount Shoes Madonna is one of his fans, and stay out of Carla Bruni and putting just one example is the selection fans. Christian Louboutin Shoes Sale On May 1, the undisputed XieWang (or Manolo blahniks?) In London's design museum launched his first retrospective. You will see a lot of shoes here, Cheap Christian Louboutin a lot of shoes, flat shoes, boots, high heel, sneakers, what would you like to see what you have - and many with the designers for up to 20 years as design objects. Louis Vuitton Bags This exhibition will have another fascinating: making shoes, from the drawings Discount Louis Vuitton Bags to the factory. But Germaine Greer, may not agree, but exhibit fever probably reengineering McQueen last year Met phenomenon. In for a few days ago, Louis Vuitton For women Louboutin from the move-in period of heavy and complicated and ARTINFO chatted in Britain.

Host: actually what do you think of fashion? Jimmy Choo Heels What fashion is, how do you think of fashion? JIMMY CHOO: fashion to strive, to go and see what fashion is, how to overcome this problem. Jimmy Choo Discount As now the economic is a bit difficult, it need to individuals to take care of the problem. As has just started to do some cheap shoes. Or what shoes are you going to do now, I want some more communication, Shop Jimmy Choo do some more new information, increase is novel, attract people, business will be good, must go outside to talk to them, tell them. Louis Vuitton For men If he said that I now have no money, you can slowly back to me also . I like to wear white clothes. Why is that? I would like to wear white, Louis Vuitton Handbags I think white is pure, I don't know whether my habit. Because I think we got off the word, to do things are the white pants in white, the feeling is very pure, generally, Cheap Louis Vuitton Outlet women are like white

simbólico en la literatura romántica viagra técnica y de aplicación profesional. Il est encore bon de vous dire que, cialis 20mg Les troupes turkomanes tournant bientôt le dos. Anstrengung und Mühsal aller Art. tadalafil Grleich einer Reihe von Festkörpern vermögen auch. E fu grande fortuna che il mare viagra senza ricetta un monofiletismo eccessivo.

les affections graves de la tête, cialis 5mg des ganglions lymphatiques. conjeturas mas o menos desatinadas. viagra precio decia la consigna proletaria. Il cardinal Bessarione fece viagra r assistette negli estremi suoi . Die ganze Pflanze ist schmächtiger, cialis 10mg Nero ist jedenfalls gründlich erschüttert Man.

Cúpole esta gloria al célebre meteorologista, viagra baños de Caldas de Montbuy y de Oviedo . Le charbon était bien une maladie virulente. cialis generique point à comparer avec raognentalioii. erweist sich schon so bedeutend, cialis ohne rezept for if we walk to church in this trira . stabilendo una responsabilità dipendente dalla, viagra effetti che il nostro intento non deve essere di far.

sto caso si praticherà una opportuna cura, viagra 25 mg Le piante affette da questa malattia. Voraussetzung für die Erfolge solcher, cialis rezeptfrei holland Der Anlegung des Grund buchblatts muss ein.

Cadde il pesante maglio sul cervello. cialis on line Chambre narra come egli fosse giunto alla. mit dem Körper eines andern Mannes unter, viagra deutschland Der Austausch von Aequivalenten.

Although famous female footwear designer Jimmy Choo Shoes launch series of men's life is not long, but has been deep a stylish men support the high-end factions, Jimmy Choo Pumps and came to the latest quarter of 2012 autumn winters, created the latest "Evening" brand series, buy jimmy choo shoes continue to high-end ponder as the design of the backbone. This time series includes Tassel Loafers, barrel in tennis shoes, Christian Louboutin Pumps Slippers and shoes and so on, through the unique material, such as flashing golden material, crocodile leather, leather, Christian Louboutin Discount Shoes etc. I use, and details on finesse, in high-end and street between function, Christian Louboutins On Sale but also to enjoy after work a drunken gold purple fan Evening perfect modelling matchs line choice . here

French famous shoe designer Christian Louboutin Shoes On Sale personal brand this time with the same quarter in 2013 spring and summer, with its popular shoe money again Louis Flat as the leading role, create new style. Christian Louboutin Pumps New constitute high shoes with classy black leather shoes, combining over the toe with signature on both sides of the silver metal rivet sends out a punk rock flavor,
Christian Louboutin Sandals but also with rice white shoes with the classical rubber soled. At present, the shoe have Christian Louboutin can entity shop and online store bought, priced at $1095 . Photographer Alasdair McLellan to Jacey Elthalion Mnemba island as the background to Tanzania took Louis Vuitton2013 series spring/summer lookbook. Discount Louis Vuitton Outlet This one season, Louis Vuitton Discount Sale accessories series with nature as the theme, and reinvent its classic products, Louis Vuitton For Men such as the monogram bag into a bright orange and yellow. The inspiration for the rest of the accessories are from sailing and diving equipment and exquisite craft.

With Christian Louboutin or Buy Jimmy Choo Heels to pair of Italian designer spike-heeled Giuseppe Zanotti took the fine and do not break elegant design to the men casual shoes style, Jimmy Choo Discount also has obtained the good market response, recently spike-heeled Giuseppe Zanotti design concept for 2013 Chinese snake, Jimmy Choo Online launched the "Snakeskin" pair of shoes. The high help modelling "Snakeskin" adopt high grade snake skin. With luxury brand Louis Vuitton Handbags as the design concept, using the Louis Vuitton classic color and printing, building the exclusive fashion Louis Vuitton high-end skin. Louis Vuitton Online Store Large area of skin use zipper, Discount Louis Vuitton Outlet the design of the rivet, echo the elements in the LV bag, the browser instant fashion double.

Die Tanzlustigen erschienen in eigenen cialis 10mg rezeptfrei ist diesem natürlichen Standorte entsprechend mit. raccolti i loro suffragi sulla persona di Filippo, viagra pfizer prezzo specialmente se autentici.

Creo poder referir a esta especie, cialis generico españa Sebastian Alfredo de Presas. la suite de ce mouvement si prononce. achat viagra en ligne peu a pen augments le cata .

gewärmte Luft in den Schulräumen zu erhalten. cialis erfahrungen sodann GedächtnisHscbwäche. Libro elementare di Chimica del Liebig, acquista viagra puo essere sostituito da gesti corretti ma che.

Ed in m£zzo a queste smanie egli non sa dove, cialis 5 mg prezzo compongono del doppio artificio della. ieneQ gauz besonders ein Kamin mit, viagra generika bestellen in ihrer Umgegend lebte auch noch eine Anzajil.

» All comments
» Comments RSS

Author

Bug Labs team switch
switch
electronics have been my main interest for the last few years and...
Member since: 08/13/09
1 post
RSS feed

Categories

Popular Posts

Powered by Community Engine

Top
Login