01 /* This file is part of the project "Hilbert II" - http://www.qedeq.org
02 *
03 * Copyright 2000-2011, Michael Meyling <mime@qedeq.org>.
04 *
05 * "Hilbert II" is free software; you can redistribute
06 * it and/or modify it under the terms of the GNU General Public
07 * License as published by the Free Software Foundation; either
08 * version 2 of the License, or (at your option) any later version.
09 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16 package org.qedeq.kernel.bo.log;
17
18 import org.qedeq.base.trace.Trace;
19
20 /**
21 * Listener that writes events to the trace.
22 *
23 * @author Michael Meyling
24 */
25 public final class TraceListener implements LogListener {
26
27 /**
28 * Constructor.
29 */
30 public TraceListener() {
31 }
32
33 public final void logMessageState(final String text, final String url) {
34 Trace.log(" state: " + text, url);
35 }
36
37 public final void logFailureState(final String text, final String url,
38 final String description) {
39 Trace.log(" failure: " + text, url, description);
40 }
41
42 public final void logSuccessfulState(final String text, final String url) {
43 Trace.log(" success: " + text, url);
44 }
45
46 public void logRequest(final String text) {
47 Trace.log(" request: " + text);
48 }
49
50 public final void logMessage(final String text) {
51 Trace.log(" " + text);
52 }
53
54 public void logSuccessfulReply(final String text) {
55 Trace.log(" reply: " + text);
56 }
57
58 public void logFailureReply(final String text, final String description) {
59 Trace.log(" reply: " + text, description);
60 }
61
62 }
|