com.ontimize.db.util
Class BasicLogWriter
java.lang.Object
com.ontimize.db.util.BasicLogWriter
- All Implemented Interfaces:
- LogWriter
- public class BasicLogWriter
- extends java.lang.Object
- implements LogWriter
|
Method Summary |
void |
close()
|
void |
flush()
|
static java.lang.String |
getFormattedString(java.lang.String table,
java.util.Hashtable columnValues,
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)
Automatically insert the new line character |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG_ENABLED
protected static boolean LOG_ENABLED
DEBUG
public static boolean DEBUG
BasicLogWriter
public BasicLogWriter(java.lang.String file)
throws java.lang.Exception
- Default value for append parameter is true
BasicLogWriter(String, boolean)
- Parameters:
file -
- Throws:
java.lang.Exception
BasicLogWriter
public BasicLogWriter(java.lang.String file,
boolean append)
throws java.lang.Exception
openFile
protected void openFile()
throws java.lang.Exception
- Throws:
java.lang.Exception
write
public void write(java.lang.String s)
- Automatically insert the new line character
- Specified by:
write in interface LogWriter
- Parameters:
s -
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 columnValues,
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)