|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.lucidera.runtime.LucidDbRuntimeContext.ErrorLoggerBase com.lucidera.runtime.LucidDbRuntimeContext.DefaultErrorLogger
private class LucidDbRuntimeContext.DefaultErrorLogger
The default error logger writes records to a file
TODO: use existing schema export code and output BCP files as well.
Field Summary | |
---|---|
private Object[] |
args
|
private SimpleDateFormat |
dateFormat
|
private boolean |
failedInit
|
private static char |
FIELD_DELIM
|
protected String |
filename
|
private String |
format
|
private boolean |
hasException
|
private static char |
LINE_DELIM
|
private boolean |
needsHeader
|
private static String |
ONE_QUOTE
|
private PrintStream |
ps
|
private static char |
QUOTE_CHAR
|
private static String |
timestampFormatStr
|
private static String |
TWO_QUOTES
|
Fields inherited from class com.lucidera.runtime.LucidDbRuntimeContext.ErrorLoggerBase |
---|
fieldCount, names, row, values |
Constructor Summary | |
---|---|
|
LucidDbRuntimeContext.DefaultErrorLogger(String filename)
|
protected |
LucidDbRuntimeContext.DefaultErrorLogger(String filename,
boolean hasException)
|
Method Summary | |
---|---|
void |
closeAllocation()
Closes this object. |
String |
getFilename()
|
void |
log(RuntimeException ex,
int columnIndex,
String tag,
boolean isWarning)
|
EigenbaseException |
log(RuntimeException ex,
int columnIndex,
String tag,
boolean isWarning,
String errorCode,
String columnName)
Writes the current log record |
private String |
quoteValue(Object o)
Converts an object to a string then quotes it |
private String |
quoteValue(String s)
Quotes a string, if required, for standard CSV format |
private String |
stripColumnQualifier(String fieldName)
Fields of generated Java code look like: ID$0$[COLNAME] This methods strips everything up to the last '$'. |
Methods inherited from class com.lucidera.runtime.LucidDbRuntimeContext.ErrorLoggerBase |
---|
completeDeferredException, getErrorCount, getFieldName, getName, getRecordString, getValue, getWarningCount, log, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String timestampFormatStr
protected String filename
private final SimpleDateFormat dateFormat
private PrintStream ps
private boolean failedInit
private Object[] args
private String format
private boolean needsHeader
private boolean hasException
private static final char LINE_DELIM
private static final char FIELD_DELIM
private static final char QUOTE_CHAR
private static final String ONE_QUOTE
private static final String TWO_QUOTES
Constructor Detail |
---|
public LucidDbRuntimeContext.DefaultErrorLogger(String filename)
protected LucidDbRuntimeContext.DefaultErrorLogger(String filename, boolean hasException)
Method Detail |
---|
public void closeAllocation()
ClosableAllocation
closeAllocation
in interface ClosableAllocation
public void log(RuntimeException ex, int columnIndex, String tag, boolean isWarning)
public EigenbaseException log(RuntimeException ex, int columnIndex, String tag, boolean isWarning, String errorCode, String columnName)
LucidDbRuntimeContext.ErrorLoggerBase
log
in class LucidDbRuntimeContext.ErrorLoggerBase
private String quoteValue(Object o)
private String quoteValue(String s)
private String stripColumnQualifier(String fieldName)
fieldName
- name of field to be cleaned strippedpublic String getFilename()
getFilename
in interface LucidDbRuntimeContext.ErrorLogger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |