Package org.jboss.as.controller.audit
Class AbstractFileAuditLogHandler
- java.lang.Object
-
- org.jboss.as.controller.audit.AbstractFileAuditLogHandler
-
- Direct Known Subclasses:
FileAuditLogHandler
,PeriodicRotatingFileAuditLogHandler
,SizeRotatingFileAuditLogHandler
public abstract class AbstractFileAuditLogHandler extends Object
All methods on this class should be called withManagedAuditLoggerImpl
's lock taken.- Author:
- Kabir Khan, Ivo Studensky
-
-
Field Summary
Fields Modifier and Type Field Description protected static byte[]
LINE_TERMINATOR
protected String
name
-
Constructor Summary
Constructors Constructor Description AbstractFileAuditLogHandler(String name, String formatterName, int maxFailureCount, PathManagerService pathManager, String path, String relativeTo)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
copyFile(File file, File backup)
protected void
createNewFile(File file)
This creates a new audit log file with default permissions.protected abstract void
initializeAtStartup(File file)
protected void
rename(File file, File to)
protected abstract void
rotateLogFile(File file)
void
setFormatterName(String formatterName)
void
setMaxFailureCount(int count)
-
-
-
Field Detail
-
LINE_TERMINATOR
protected static final byte[] LINE_TERMINATOR
-
name
protected final String name
-
-
Constructor Detail
-
AbstractFileAuditLogHandler
public AbstractFileAuditLogHandler(String name, String formatterName, int maxFailureCount, PathManagerService pathManager, String path, String relativeTo)
-
-
Method Detail
-
initializeAtStartup
protected abstract void initializeAtStartup(File file)
-
rotateLogFile
protected abstract void rotateLogFile(File file)
-
copyFile
protected void copyFile(File file, File backup) throws IOException
- Throws:
IOException
-
rename
protected void rename(File file, File to) throws IOException
- Throws:
IOException
-
createNewFile
protected void createNewFile(File file)
This creates a new audit log file with default permissions.- Parameters:
file
- File to create
-
setMaxFailureCount
public void setMaxFailureCount(int count)
-
setFormatterName
public void setFormatterName(String formatterName)
-
-