uk.ac.bham.gloss
Class DoubleLogger

java.lang.Object
  extended by uk.ac.bham.gloss.NullLogger
      extended by uk.ac.bham.gloss.DoubleLogger
All Implemented Interfaces:
Logger

public class DoubleLogger
extends NullLogger

A Loger object presents a "log" of an execution, eg, for debugging. This one writes all output to two Logger objects. Copyright Richard Kaye 2007-8 for GLOSS, http://gloss.bham.ac.uk Usage permitted according to the GPL. No waranty.


Field Summary
 
Fields inherited from interface uk.ac.bham.gloss.Logger
LOG_ACTIONS, LOG_ALL, LOG_ERRORS, LOG_FILES, LOG_INPUT, LOG_MESSAGES, LOG_MODES, LOG_NONE, LOG_NORMAL, LOG_OUTPUT, LOG_PARAMETERS, LOG_PROCESSES
 
Constructor Summary
DoubleLogger(Logger p, Logger s)
           
 
Method Summary
 void doattribute(java.lang.String name, boolean value)
          add attribute to an opened tag
 void doattribute(java.lang.String name, int value)
          add attribute to an opened tag
 void doattribute(java.lang.String name, java.lang.String value)
          add attribute to an opened tag
 void docloseelement()
          closes the element line
 void docloseelement(java.lang.String name)
          closes the element line, checking correct name
 void doclosetag()
          close the tag
 void docr()
          prints cr and indentation
 void doelement(java.lang.String name)
          opens a log line with a XML tag "name"
 void doprint(java.lang.String text)
          prints text to output
 void doprintln(java.lang.String text)
          prints text to output
 int mode()
          returns the mode of this logger
 Logger thisLogger()
          returns this logger
 
Methods inherited from class uk.ac.bham.gloss.NullLogger
attribute, attribute, attribute, attribute, attribute, attribute, closeelement, closeelement, closeelement, closeelement, closetag, closetag, cr, cr, element, element, lastmask, print, print, println, println
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleLogger

public DoubleLogger(Logger p,
                    Logger s)
Method Detail

mode

public int mode()
Description copied from interface: Logger
returns the mode of this logger

Specified by:
mode in interface Logger
Overrides:
mode in class NullLogger

thisLogger

public Logger thisLogger()
Description copied from interface: Logger
returns this logger

Specified by:
thisLogger in interface Logger
Overrides:
thisLogger in class NullLogger

docr

public void docr()
prints cr and indentation

Overrides:
docr in class NullLogger

doelement

public void doelement(java.lang.String name)
opens a log line with a XML tag "name"

Overrides:
doelement in class NullLogger

doprint

public void doprint(java.lang.String text)
prints text to output

Overrides:
doprint in class NullLogger

doprintln

public void doprintln(java.lang.String text)
prints text to output

Overrides:
doprintln in class NullLogger

docloseelement

public void docloseelement()
closes the element line

Overrides:
docloseelement in class NullLogger

docloseelement

public void docloseelement(java.lang.String name)
closes the element line, checking correct name

Overrides:
docloseelement in class NullLogger

doclosetag

public void doclosetag()
close the tag

Overrides:
doclosetag in class NullLogger

doattribute

public void doattribute(java.lang.String name,
                        java.lang.String value)
add attribute to an opened tag

Overrides:
doattribute in class NullLogger

doattribute

public void doattribute(java.lang.String name,
                        int value)
add attribute to an opened tag

Overrides:
doattribute in class NullLogger

doattribute

public void doattribute(java.lang.String name,
                        boolean value)
add attribute to an opened tag

Overrides:
doattribute in class NullLogger