org.basex.server
Class Log

java.lang.Object
  extended by org.basex.server.Log

public final class Log
extends java.lang.Object

This class writes daily log files to disk. The log format has been updated in Version 7.4; it now has the following columns:

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
static java.lang.String ERROR
          ERROR string.
static java.lang.String REQUEST
          REQUEST string.
static java.lang.String SERVER
          SERVER string.
 
Constructor Summary
Log(Context ctx)
          Constructor.
 
Method Summary
 void close()
          Closes the log file.
 IOFile dir()
          Returns a reference to the log directory.
 IOFile[] files()
          Returns all log files.
 void write(java.lang.Object... str)
          Writes an entry to the log file.
 void writeError(java.lang.Throwable th)
          Writes an error to the log file.
 void writeServer(java.lang.Object... str)
          Writes a server entry to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

public static final java.lang.String SERVER
SERVER string.

See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
ERROR string.

See Also:
Constant Field Values

REQUEST

public static final java.lang.String REQUEST
REQUEST string.

See Also:
Constant Field Values
Constructor Detail

Log

public Log(Context ctx)
Constructor.

Parameters:
ctx - database context
Method Detail

writeError

public void writeError(java.lang.Throwable th)
Writes an error to the log file.

Parameters:
th - throwable

writeServer

public void writeServer(java.lang.Object... str)
Writes a server entry to the log file.

Parameters:
str - strings to be written

write

public void write(java.lang.Object... str)
Writes an entry to the log file.

Parameters:
str - strings to be written

close

public void close()
Closes the log file.


dir

public IOFile dir()
Returns a reference to the log directory.

Returns:
log directory

files

public IOFile[] files()
Returns all log files.

Returns:
log directory