org.crosswire.jsword.book
Class DataPolice

java.lang.Object
  extended by org.crosswire.jsword.book.DataPolice

public final class DataPolice
extends Object

When we can't convert some source data then the user doesn't really care and just wants it to work, but it would be good to have some way to get the problems fixed, so as a start point we report them through this class.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details.
The copyright to this program is held by it's authors.

Field Summary
private static Level level
          The level at which to do logging.
private static Logger log
          The log stream
 
Constructor Summary
private DataPolice()
          Prevent instantiation
 
Method Summary
static void report(Book book, Key key, Level lev, String message)
          Report a message against the current book and key.
static void report(Book book, Key key, String message)
          Report a message against the current book and key.
static void setLevel(Level lev)
          Set the level at which to show problems.
static void setReportingLevel(Level lev)
          Set the current level at which to report problems.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

level

private static Level level
The level at which to do logging. Default is FINE.


log

private static final Logger log
The log stream

Constructor Detail

DataPolice

private DataPolice()
Prevent instantiation

Method Detail

setReportingLevel

public static void setReportingLevel(Level lev)
Set the current level at which to report problems. Problems at too fine grain a level might be filtered by default.

Parameters:
lev - the level to set

setLevel

public static void setLevel(Level lev)
Set the level at which to show problems.

Parameters:
lev - the level to set

report

public static void report(Book book,
                          Key key,
                          Level lev,
                          String message)
Report a message against the current book and key.

Parameters:
lev - the level at which to report
message - the police report.

report

public static void report(Book book,
                          Key key,
                          String message)
Report a message against the current book and key.

Parameters:
message - the police report.

Copyright ? 2003-2011