Class Log4JRepositoryImportLogger
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importexport.Log4JRepositoryImportLogger
-
- All Implemented Interfaces:
org.apache.commons.logging.Log
,IRepositoryImportLogger
public class Log4JRepositoryImportLogger extends Object implements IRepositoryImportLogger
- Author:
- TKafalas
-
-
Constructor Summary
Constructors Constructor Description Log4JRepositoryImportLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(Object arg0)
void
debug(Object arg0, Throwable arg1)
void
debug(String s)
Log debug informationvoid
endJob()
Makes an "End Import Job" log entry and releases memory associated with this log.void
error(Exception e)
Log error informationvoid
error(Object arg0)
void
error(Object arg0, Throwable arg1)
void
error(String s)
Log an error.void
fatal(Object arg0)
void
fatal(Object arg0, Throwable arg1)
boolean
hasLogger()
Allows a class to check if an ImportLogger has been instantiated for the current thread.void
info(Object arg0)
void
info(Object arg0, Throwable arg1)
void
info(String s)
Log informational data.boolean
isDebugEnabled()
boolean
isErrorEnabled()
boolean
isFatalEnabled()
boolean
isInfoEnabled()
boolean
isTraceEnabled()
boolean
isWarnEnabled()
void
setCurrentFilePath(String currentFilePath)
Registers the file being worked on.void
startJob(OutputStream outputStream, String importRootPath, org.apache.logging.log4j.Level logLevel)
Initiates an import job.void
trace(Object arg0)
void
trace(Object arg0, Throwable arg1)
void
warn(Object arg0)
void
warn(Object arg0, Throwable arg1)
void
warn(String s)
-
-
-
Method Detail
-
startJob
public void startJob(OutputStream outputStream, String importRootPath, org.apache.logging.log4j.Level logLevel)
Description copied from interface:IRepositoryImportLogger
Initiates an import job. Each call creates a new log associated with the current thread.- Specified by:
startJob
in interfaceIRepositoryImportLogger
- Parameters:
outputStream
- Will receive the html content of the logimportRootPath
- The root import dir receiving the importlogLevel
- The log level to be logged.
-
endJob
public void endJob()
Description copied from interface:IRepositoryImportLogger
Makes an "End Import Job" log entry and releases memory associated with this log.- Specified by:
endJob
in interfaceIRepositoryImportLogger
-
setCurrentFilePath
public void setCurrentFilePath(String currentFilePath)
Description copied from interface:IRepositoryImportLogger
Registers the file being worked on. Each log entry will list the path to the file being processed. Call this method just before processing the next file. It will automatically post a "Start File Import" entry in the log.- Specified by:
setCurrentFilePath
in interfaceIRepositoryImportLogger
- Parameters:
currentFilePath
- path to file being imported
-
info
public void info(String s)
Description copied from interface:IRepositoryImportLogger
Log informational data. Should be called when the starting a new file and when finishing that file.- Specified by:
info
in interfaceIRepositoryImportLogger
- Parameters:
s
- The information message to be logged.
-
error
public void error(String s)
Description copied from interface:IRepositoryImportLogger
Log an error.- Specified by:
error
in interfaceIRepositoryImportLogger
- Parameters:
s
- The Error message to be logged.
-
debug
public void debug(String s)
Description copied from interface:IRepositoryImportLogger
Log debug information- Specified by:
debug
in interfaceIRepositoryImportLogger
- Parameters:
s
- The debug message to be logged
-
warn
public void warn(String s)
-
error
public void error(Exception e)
Description copied from interface:IRepositoryImportLogger
Log error information- Specified by:
error
in interfaceIRepositoryImportLogger
- Parameters:
e
- The exception to be logged.
-
hasLogger
public boolean hasLogger()
Description copied from interface:IRepositoryImportLogger
Allows a class to check if an ImportLogger has been instantiated for the current thread.- Specified by:
hasLogger
in interfaceIRepositoryImportLogger
- Returns:
- true if the logger is present.
-
debug
public void debug(Object arg0)
- Specified by:
debug
in interfaceorg.apache.commons.logging.Log
-
debug
public void debug(Object arg0, Throwable arg1)
- Specified by:
debug
in interfaceorg.apache.commons.logging.Log
-
error
public void error(Object arg0)
- Specified by:
error
in interfaceorg.apache.commons.logging.Log
-
error
public void error(Object arg0, Throwable arg1)
- Specified by:
error
in interfaceorg.apache.commons.logging.Log
-
fatal
public void fatal(Object arg0)
- Specified by:
fatal
in interfaceorg.apache.commons.logging.Log
-
fatal
public void fatal(Object arg0, Throwable arg1)
- Specified by:
fatal
in interfaceorg.apache.commons.logging.Log
-
info
public void info(Object arg0)
- Specified by:
info
in interfaceorg.apache.commons.logging.Log
-
info
public void info(Object arg0, Throwable arg1)
- Specified by:
info
in interfaceorg.apache.commons.logging.Log
-
isDebugEnabled
public boolean isDebugEnabled()
- Specified by:
isDebugEnabled
in interfaceorg.apache.commons.logging.Log
-
isErrorEnabled
public boolean isErrorEnabled()
- Specified by:
isErrorEnabled
in interfaceorg.apache.commons.logging.Log
-
isFatalEnabled
public boolean isFatalEnabled()
- Specified by:
isFatalEnabled
in interfaceorg.apache.commons.logging.Log
-
isInfoEnabled
public boolean isInfoEnabled()
- Specified by:
isInfoEnabled
in interfaceorg.apache.commons.logging.Log
-
isTraceEnabled
public boolean isTraceEnabled()
- Specified by:
isTraceEnabled
in interfaceorg.apache.commons.logging.Log
-
isWarnEnabled
public boolean isWarnEnabled()
- Specified by:
isWarnEnabled
in interfaceorg.apache.commons.logging.Log
-
trace
public void trace(Object arg0)
- Specified by:
trace
in interfaceorg.apache.commons.logging.Log
-
trace
public void trace(Object arg0, Throwable arg1)
- Specified by:
trace
in interfaceorg.apache.commons.logging.Log
-
warn
public void warn(Object arg0)
- Specified by:
warn
in interfaceorg.apache.commons.logging.Log
-
-