Package org.opencms.module
Class CmsModuleLog
- java.lang.Object
-
- org.opencms.module.CmsModuleLog
-
public class CmsModuleLog extends java.lang.Object
This class is responsible for reading and writing module import/export log messages, to be used by CmsResourceWrapperModules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCmsModuleLog.ActionAction type.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATE_FORMAT_STRINGDate format for log messages.
-
Constructor Summary
Constructors Constructor Description CmsModuleLog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetLogFile(java.lang.String moduleName)Gets the log file for the given module name.voidlog(java.lang.String moduleName, CmsModuleLog.Action action, boolean ok)Logs a module action.byte[]readLog(java.lang.String moduleName)Reads the log file and returns the data.
-
-
-
Field Detail
-
DATE_FORMAT_STRING
public static final java.lang.String DATE_FORMAT_STRING
Date format for log messages.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsModuleLog
public CmsModuleLog()
-
-
Method Detail
-
getLogFile
public java.io.File getLogFile(java.lang.String moduleName)
Gets the log file for the given module name.- Parameters:
moduleName- the module- Returns:
- the log file
-
log
public void log(java.lang.String moduleName, CmsModuleLog.Action action, boolean ok)
Logs a module action.- Parameters:
moduleName- the module nameaction- the actionok- true if the action was successful
-
readLog
public byte[] readLog(java.lang.String moduleName) throws java.io.IOException
Reads the log file and returns the data.- Parameters:
moduleName- the module name- Returns:
- the log contents
- Throws:
java.io.IOException- if something goes wrong
-
-