org.odftoolkit.odfxsltrunner
Class Logger

java.lang.Object
  extended by org.odftoolkit.odfxsltrunner.Logger
Direct Known Subclasses:
CommandLineLogger

public abstract class Logger
extends Object

Base class for logging messages.


Field Summary
static int ERROR
          Error log level.
static int INFO
          Information log level.
static int WARNING
          Warning log level.
 
Constructor Summary
protected Logger()
          Create a new Logger instance.
 
Method Summary
protected  String getName()
          Get name of the file for which messagea are logged.
 boolean hasError()
          Was an error or fatal error logged.
protected abstract  void logMessage(String aPrefix, String aMsg, String aLocation, int nLevel)
          Log a message.
protected abstract  void logMessageWithLocation(String aPrefix, String aMsgWithLocation, int nLevel)
          Log a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR

public static final int ERROR
Error log level.

See Also:
Constant Field Values

WARNING

public static final int WARNING
Warning log level.

See Also:
Constant Field Values

INFO

public static final int INFO
Information log level.

See Also:
Constant Field Values
Constructor Detail

Logger

protected Logger()
Create a new Logger instance.

Method Detail

getName

protected String getName()
Get name of the file for which messagea are logged.

Returns:
file name

hasError

public boolean hasError()
Was an error or fatal error logged.

Returns:
true if an error was logged.

logMessage

protected abstract void logMessage(String aPrefix,
                                   String aMsg,
                                   String aLocation,
                                   int nLevel)
Log a message.

Parameters:
aPrefix - Message prefix
aMsg - Message text
aLocation - file, row and column number as text (optional)
nLevel - the warning level (one of INFO, WARNING or ERROR)

logMessageWithLocation

protected abstract void logMessageWithLocation(String aPrefix,
                                               String aMsgWithLocation,
                                               int nLevel)
Log a message.

Parameters:
aPrefix - Message prefix
aMsgWithLocation - Message text including location information
nLevel - the warning level (one of INFO, WARNING or ERROR)


Copyright © 2017 The Apache Software Foundation. All rights reserved.