diff options
author | mwebster <mwebster> | 2006-08-14 15:53:09 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-08-14 15:53:09 +0000 |
commit | 2aac0a2e476d4c5bda5b9e2c5ea24ef337aa3388 (patch) | |
tree | 6e16d9f030167b5bfe16d5ee865c769af31d1e7b /loadtime/src/org/aspectj | |
parent | 0850eef4c7060de3848dfdfe90c8b6c7d3d2e75f (diff) | |
download | aspectj-2aac0a2e476d4c5bda5b9e2c5ea24ef337aa3388.tar.gz aspectj-2aac0a2e476d4c5bda5b9e2c5ea24ef337aa3388.zip |
Bug 150487 "Tracing and Logging Framework" (remove TraceMessageHandler)
Diffstat (limited to 'loadtime/src/org/aspectj')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/TraceMessageHandler.java | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/TraceMessageHandler.java b/loadtime/src/org/aspectj/weaver/loadtime/TraceMessageHandler.java deleted file mode 100644 index b661bc799..000000000 --- a/loadtime/src/org/aspectj/weaver/loadtime/TraceMessageHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Matthew Webster - initial implementation - *******************************************************************************/ -package org.aspectj.weaver.loadtime; - -import org.aspectj.bridge.AbortException; -import org.aspectj.bridge.IMessage; -import org.aspectj.bridge.IMessageHandler; -import org.aspectj.bridge.WeaveMessage; -import org.aspectj.bridge.IMessage.Kind; -import org.aspectj.weaver.tools.Trace; -import org.aspectj.weaver.tools.TraceFactory; - -public class TraceMessageHandler implements IMessageHandler { - - private Trace trace; - - public TraceMessageHandler () { - this(TraceFactory.getTraceFactory().getTrace(TraceMessageHandler.class)); - } - - /** - * Used for testing - * - */ - protected TraceMessageHandler (Trace t) { - this.trace = t; - } - - /* Ignore this and defer all decisions about what we log to the Trace - * configuration - */ - public void dontIgnore(Kind kind) { - } - - public boolean handleMessage(IMessage message) throws AbortException { - if (message instanceof WeaveMessage) { - trace.debug(render(message)); - } - else if (message.isDebug()) { - trace.debug(render(message)); - } - else if (message.isInfo()) { - trace.info(render(message)); - } - else if (message.isWarning()) { - trace.warn(render(message),message.getThrown()); - } - else if (message.isError()) { - trace.error(render(message),message.getThrown()); - } - else if (message.isFailed()) { - trace.fatal(render(message),message.getThrown()); - } - else if (message.isAbort()) { - trace.fatal(render(message),message.getThrown()); - } - else return false; - - return true; - } - - /* Ignore this and defer all decisions about what we log to the Trace - * configuration - */ - public boolean isIgnoring(Kind kind) { - return false; - } - - protected String render(IMessage message) { - return message.toString(); - } - -} |