001: /*
002: * Copyright 2001-2006 C:1 Financial Services GmbH
003: *
004: * This software is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License Version 2.1, as published by the Free Software Foundation.
007: *
008: * This software is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
011: * Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public
014: * License along with this library; if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
016: */
017:
018: package de.finix.contelligent.client.event;
019:
020: import java.util.logging.Logger;
021:
022: public class LogEvent extends AbstractContelligentEvent {
023:
024: private static Logger logger = Logger.getLogger(LogEvent.class
025: .getName());
026:
027: private String level;
028:
029: private String callerClass;
030:
031: private String callerMethod;
032:
033: private String callerLine;
034:
035: private String callerFile;
036:
037: private String timestamp;
038:
039: private String message;
040:
041: private String throwable;
042:
043: private String stackTrace;
044:
045: private String originType;
046:
047: public LogEvent(String level, String callerClass,
048: String callerMethod, String callerLine, String callerFile,
049: String timestamp, String message, String throwable,
050: String stackTrace, String originType) {
051: super ("log4j");
052: this .level = level;
053: this .callerClass = callerClass;
054: this .callerMethod = callerMethod;
055: this .callerLine = callerLine;
056: this .callerFile = callerFile;
057: this .timestamp = timestamp;
058: this .message = message;
059: this .throwable = throwable;
060: this .stackTrace = stackTrace;
061: this .originType = originType;
062: }
063:
064: public String getLevel() {
065: return level;
066: }
067:
068: public String getCallerClass() {
069: return callerClass;
070: }
071:
072: public String getCallerMethod() {
073: return callerMethod;
074: }
075:
076: public String getCallerLine() {
077: return callerLine;
078: }
079:
080: public String getCallerFile() {
081: return callerFile;
082: }
083:
084: public String getTimestamp() {
085: return timestamp;
086: }
087:
088: public String getMessage() {
089: return message;
090: }
091:
092: public String getThrowable() {
093: return throwable;
094: }
095:
096: public String getStackTrace() {
097: return stackTrace;
098: }
099:
100: public String getOriginType() {
101: return originType;
102: }
103:
104: public String toString() {
105: return getClass().getName() + "[level=" + getLevel()
106: + ", timestamp=" + getTimestamp() + ", message="
107: + getMessage() + ", callerClass=" + getCallerClass()
108: + ", callerMethod=" + getCallerMethod()
109: + ", callerLine=" + getCallerLine() + ", callerFile="
110: + getCallerFile() + ", throwable="
111: + (throwable != null ? getThrowable() : "") + "]";
112: }
113: }
|