View Javadoc

1   /*
2    * $Id: ITraceWriter.java,v 1.4 2004/09/02 20:45:52 jlerner Exp $
3    *
4    * Copyright (c) 1999-2004, BBN Technologies, LLC.
5    * All rights reserved.
6    * http://www.daml.org/legal/opensource/bbn_license.html
7    */
8   
9   package com.bbn.swede.core;
10  
11  /***
12   * An interface for implementing trace output in SWeDE.  A plugin that
13   * extends the com.bbn.swede.core.traceWriter extension point and provides an
14   * implementation of this interface will receive all trace output sent to
15   * OWLCore.  This allows debug output to be captured without cluttering SWeDE
16   * with a lot of System.out.println() statements.
17   * @see OWLCore#trace(String, String, boolean)
18   * @author tself
19   */
20  public interface ITraceWriter
21  {
22     /***
23      * Method used to write a trace message.
24      * This could be implemented to write to STDOUT, a log file, a window, etc.
25      * @param id short description of the class or method calling trace
26      * @param msg message to be written
27      * @param error whether this is considered an error or not
28      */
29     void write(String id, String msg, boolean error);
30  }