Ontimize 5.2072EN

com.ontimize.db.util
Class DBLogWriter

java.lang.Object
  extended bycom.ontimize.db.util.DBLogWriter
All Implemented Interfaces:
LogWriter

public class DBLogWriter
extends java.lang.Object
implements LogWriter

LogWriter. Save the indicated values in a file.
The file writing is doing in a separated thread with low priority.


Nested Class Summary
protected  class DBLogWriter.SavingThread
           
 
Field Summary
static boolean DEBUG
           
protected static boolean LOG_ENABLED
           
 
Constructor Summary
DBLogWriter(java.lang.String file)
          append parameter default value is true, DBLogWriter(String, boolean)
DBLogWriter(java.lang.String file, boolean append)
           
 
Method Summary
 void close()
           
 void flush()
           
static java.lang.String getFormattedString(java.lang.String table, java.util.Hashtable columnsValues, java.lang.String operation, java.lang.String user, long date, java.util.Hashtable conditions)
           
static java.lang.String getFormattedString(java.lang.String table, java.util.Vector columns, java.lang.String operation, java.lang.String user, long date, java.util.Hashtable conditions)
           
static boolean isLogEnabled()
           
 void newLine()
           
protected  void openFile()
           
static void setLogEnabled(boolean enabled)
           
 void write(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_ENABLED

protected static boolean LOG_ENABLED

DEBUG

public static boolean DEBUG
Constructor Detail

DBLogWriter

public DBLogWriter(java.lang.String file)
            throws java.lang.Exception
append parameter default value is true, DBLogWriter(String, boolean)

Parameters:
file -
Throws:
java.lang.Exception

DBLogWriter

public DBLogWriter(java.lang.String file,
                   boolean append)
            throws java.lang.Exception
Method Detail

openFile

protected void openFile()
                 throws java.lang.Exception
Throws:
java.lang.Exception

write

public void write(java.lang.String s)
Specified by:
write in interface LogWriter

newLine

public void newLine()
Specified by:
newLine in interface LogWriter

flush

public void flush()

getFormattedString

public static final java.lang.String getFormattedString(java.lang.String table,
                                                        java.util.Vector columns,
                                                        java.lang.String operation,
                                                        java.lang.String user,
                                                        long date,
                                                        java.util.Hashtable conditions)

getFormattedString

public static final java.lang.String getFormattedString(java.lang.String table,
                                                        java.util.Hashtable columnsValues,
                                                        java.lang.String operation,
                                                        java.lang.String user,
                                                        long date,
                                                        java.util.Hashtable conditions)

close

public void close()
Specified by:
close in interface LogWriter

isLogEnabled

public static boolean isLogEnabled()

setLogEnabled

public static void setLogEnabled(boolean enabled)

Ontimize