|
What this is
Other links
The source code/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software
* License version 1.1, a copy of which has been included with this
* distribution in the LICENSE.txt file. */
package org.apache.log4j.chainsaw;
import java.util.StringTokenizer;
import org.apache.log4j.Priority;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
* A content handler for document containing Log4J events logged using the
* XMLLayout class. It will create events and add them to a supplied model.
*
* @author Oliver Burn
* @version 1.0
*/
class XMLFileHandler
extends DefaultHandler
{
/** represents the event tag **/
private static final String TAG_EVENT = "log4j:event";
/** represents the message tag **/
private static final String TAG_MESSAGE = "log4j:message";
/** represents the ndc tag **/
private static final String TAG_NDC = "log4j:NDC";
/** represents the throwable tag **/
private static final String TAG_THROWABLE = "log4j:throwable";
/** represents the location info tag **/
private static final String TAG_LOCATION_INFO = "log4j:locationInfo";
/** where to put the events **/
private final MyTableModel mModel;
/** the number of events in the document **/
private int mNumEvents;
/** the time of the event **/
private long mTimeStamp;
/** the priority (level) of the event **/
private Priority mPriority;
/** the category of the event **/
private String mCategoryName;
/** the NDC for the event **/
private String mNDC;
/** the thread for the event **/
private String mThreadName;
/** the msg for the event **/
private String mMessage;
/** the throwable details the event **/
private String[] mThrowableStrRep;
/** the location details for the event **/
private String mLocationDetails;
/** buffer for collecting text **/
private final StringBuffer mBuf = new StringBuffer();
/**
* Creates a new
|
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.