|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.di.core.logging.LogWriter
public class LogWriter
This class handles the logging.
Field Summary | |
---|---|
static int |
LOG_LEVEL_BASIC
|
static int |
LOG_LEVEL_DEBUG
|
static String[] |
log_level_desc_long
|
static int |
LOG_LEVEL_DETAILED
|
static int |
LOG_LEVEL_ERROR
|
static int |
LOG_LEVEL_MINIMAL
|
static int |
LOG_LEVEL_NOTHING
|
static int |
LOG_LEVEL_ROWLEVEL
|
static String[] |
logLevelDescription
|
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()
|
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(int lvl)
|
static LogWriter |
getInstance(String filename,
boolean exact,
int level)
Get a new log instance for the specified file if it is not open yet! |
static org.apache.log4j.Layout |
getLayout()
|
int |
getLogLevel()
|
static int |
getLogLevel(String lvl)
|
String |
getLogLevelDesc()
|
static String |
getLogLevelDesc(int l)
|
String |
getLogLevelLongDesc()
|
File |
getRealFilename()
|
int |
getType()
|
boolean |
isBasic()
|
boolean |
isDebug()
|
boolean |
isDetailed()
|
boolean |
isRowLevel()
|
void |
logBasic(String subject,
String message,
Object... args)
|
void |
logDebug(String subject,
String message,
Object... args)
|
void |
logDetailed(String subject,
String message,
Object... args)
|
void |
logError(String subject,
String message,
Object... args)
|
void |
logError(String subject,
String message,
Throwable e)
|
void |
logMinimal(String subject,
String message,
Object... args)
|
void |
logRowlevel(String subject,
String message,
Object... args)
|
void |
println(int lvl,
String msg)
|
void |
println(int lvl,
String subj,
String msg,
Object... args)
|
void |
removeAppender(org.apache.log4j.Appender appender)
|
static void |
setConsoleAppenderDebug()
|
void |
setFilter(String filter)
|
static void |
setLayout(org.apache.log4j.Layout layout)
|
void |
setLogLevel(int lvl)
|
void |
setLogLevel(String lvl)
|
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 int LOG_LEVEL_NOTHING
public static final int LOG_LEVEL_ERROR
public static final int LOG_LEVEL_MINIMAL
public static final int LOG_LEVEL_BASIC
public static final int LOG_LEVEL_DETAILED
public static final int LOG_LEVEL_DEBUG
public static final int LOG_LEVEL_ROWLEVEL
public static final String[] logLevelDescription
public static final String[] log_level_desc_long
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(int lvl)
public static final LogWriter getInstance(String filename, boolean exact, int level) throws KettleException
filename
- The log file to openexact
- is this an exact filename (false: prefix of name in temp directory)level
- The log level
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()
public static void setConsoleAppenderDebug()
public int getType()
public void setType(int type)
public boolean close()
public void setLogLevel(int lvl)
public void setLogLevel(String lvl)
public int getLogLevel()
public String getLogLevelDesc()
public String getLogLevelLongDesc()
public void println(int lvl, String msg)
public void println(int lvl, String subj, String msg, Object... args)
public void logMinimal(String subject, String message, Object... args)
public void logBasic(String subject, String message, Object... args)
public void logDetailed(String subject, String message, Object... args)
public void logDebug(String subject, String message, Object... args)
public void logRowlevel(String subject, String message, Object... args)
public void logError(String subject, String message, Object... args)
public void logError(String subject, String message, Throwable e)
public void setFilter(String filter)
public String getFilter()
public static final int getLogLevel(String lvl)
public static final String getLogLevelDesc(int l)
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 boolean isBasic()
public boolean isDetailed()
public boolean isDebug()
public boolean isRowLevel()
public 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 |