Top Fields Constructors Methods
org.apache.derby.impl.store.replication

public Class ReplicationLogger

extends Object
Class Inheritance
Imports
java.util.Date, org.apache.derby.shared.common.reference.MessageId, .Property, org.apache.derby.shared.common.error.ErrorStringBuilder, org.apache.derby.iapi.services.monitor.Monitor, org.apache.derby.iapi.services.property.PropertyUtil

Field Summary

Modifier and TypeField and Description
private final String
dbname

The name of the replicated database

private final boolean
verbose

Whether or not to print log messages to derby.log.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
logError(String
The error message id
msgId
,
Throwable
Error trace starts from this error
t
)

Print error message and the stack trace of the throwable to the log (usually derby.log) provided that verbose is true.

public void
logText(String
The text that will be logged
text
,
boolean
if true, encapsulates message in "begin error message" and "end error message" lines. If false, timestamps the text and writes it to the log without the header and footer.
writeHeader
)

Print a text to the log (usually derby.log), provided that verbose is true.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dbnameback to summary
private final String dbname

The name of the replicated database

verboseback to summary
private final boolean verbose

Whether or not to print log messages to derby.log. Defaults to true, but can be set to false with derby property "derby.replication.verbose=false".

Constructor Detail

ReplicationLoggerback to summary
public ReplicationLogger(String dbname)

Method Detail

logErrorback to summary
public void logError(String msgId, Throwable t)

Print error message and the stack trace of the throwable to the log (usually derby.log) provided that verbose is true. If verbose is false, nothing is logged.

Parameters
msgId:String

The error message id

t:Throwable

Error trace starts from this error

logTextback to summary
public void logText(String text, boolean writeHeader)

Print a text to the log (usually derby.log), provided that verbose is true.

Parameters
text:String

The text that will be logged

writeHeader:boolean

if true, encapsulates message in "begin error message" and "end error message" lines. If false, timestamps the text and writes it to the log without the header and footer.