|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.core.logging.LogWriter
public class LogWriter
This class handles the logging.
Field Summary | |
---|---|
static String |
STRING_PENTAHO_DI_CONSOLE_APPENDER
|
static String |
STRING_PENTAHO_DI_LOGGER_NAME
|
Method Summary | |
---|---|
void |
addAppender(org.apache.log4j.Appender appender)
|
boolean |
close()
|
static void |
closeAndRemoveFileAppender()
Closes the file appender opened by the getInstance(filename, exact, level) method |
static Log4jFileAppender |
createFileAppender(String filename,
boolean exact)
Create a file appender |
static Log4jFileAppender |
createFileAppender(String filename,
boolean exact,
boolean append)
Create a file appender |
static String |
createFileAppenderName(String filename,
boolean exact)
|
static Log4jStringAppender |
createStringAppender()
Deprecated. Please use CentralLogStore.getAppender() instead. This uses a central logging buffer in stead of a distributed one.
It also supports incremental buffer gets, and much more. |
org.apache.commons.vfs.FileObject |
getFileAppenderFile()
This is not thread safe: please try to get the file appender yourself using the static constructor and work from there |
InputStream |
getFileInputStream()
This is not thread safe: please try to get the file appender yourself using the static constructor and work from there |
FileInputStream |
getFileInputStream(String filename,
boolean exact)
Get the file input stream for a certain appender. |
String |
getFilter()
|
static LogWriter |
getInstance()
|
static LogWriter |
getInstance(String filename,
boolean exact)
Get a new log instance for the specified file if it is not open yet! |
static org.apache.log4j.Layout |
getLayout()
|
File |
getRealFilename()
|
int |
getType()
|
void |
println(LogMessageInterface logMessage,
LogLevel channelLogLevel)
|
void |
println(LogMessageInterface message,
Throwable e,
LogLevel channelLogLevel)
|
void |
removeAppender(org.apache.log4j.Appender appender)
|
static void |
setConsoleAppenderDebug()
|
void |
setFilter(String filter)
|
static void |
setLayout(org.apache.log4j.Layout layout)
|
void |
setRealFilename(File realFilename)
|
void |
setType(int type)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STRING_PENTAHO_DI_LOGGER_NAME
public static final String STRING_PENTAHO_DI_CONSOLE_APPENDER
Method Detail |
---|
public static final LogWriter getInstance()
public static final LogWriter getInstance(String filename, boolean exact) throws KettleException
filename
- The log file to openexact
- is this an exact filename (false: prefix of name in temp directory)
KettleException
public static final void closeAndRemoveFileAppender()
public static final Log4jFileAppender createFileAppender(String filename, boolean exact) throws KettleFileException
filename
- The (VFS) filename (URL) to write to.exact
- is this an exact filename of a filename to be stored in "java.io.tmp"
KettleFileException
- In case there is a problem opening the file.public static final Log4jFileAppender createFileAppender(String filename, boolean exact, boolean append) throws KettleFileException
filename
- The (VFS) filename (URL) to write to.exact
- is this an exact filename of a filename to be stored in "java.io.tmp"append
-
KettleFileException
- In case there is a problem opening the file.public static final String createFileAppenderName(String filename, boolean exact)
public static final Log4jStringAppender createStringAppender()
CentralLogStore.getAppender()
instead. This uses a central logging buffer in stead of a distributed one.
It also supports incremental buffer gets, and much more.
public static void setConsoleAppenderDebug()
public int getType()
public void setType(int type)
public boolean close()
public void println(LogMessageInterface logMessage, LogLevel channelLogLevel)
logMessage
- channelLogLevel
- public void println(LogMessageInterface message, Throwable e, LogLevel channelLogLevel)
public void setFilter(String filter)
public String getFilter()
public InputStream getFileInputStream() throws IOException
IOException
public org.apache.commons.vfs.FileObject getFileAppenderFile() throws IOException
IOException
public FileInputStream getFileInputStream(String filename, boolean exact) throws IOException
filename
- The exact filename (with path: c:\temp\logfile.txt) or just a filename (spoon.log)exact
- true if this is the exact filename or just the last part of the complete path.
IOException
- in case the appender ocan't be foundpublic File getRealFilename()
public void setRealFilename(File realFilename)
realFilename
- The realFilename to set.public void addAppender(org.apache.log4j.Appender appender)
public void removeAppender(org.apache.log4j.Appender appender)
public static void setLayout(org.apache.log4j.Layout layout)
public static org.apache.log4j.Layout getLayout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |