Skip to content

Commit 0e93e2a

Browse files
committed
Merge branch 'master' of https://github.com/audit4j/audit4j-core
2 parents f1de094 + f8816b2 commit 0e93e2a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/main/java/org/audit4j/core/handler/file/ZeroCopyFileWriter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ public void init() {
8282
*/
8383
@Override
8484
public ZeroCopyFileWriter write(String event) {
85-
String realPath = FileHandlerUtil.generateOutputFilePath(path);
85+
// String realPath = FileHandlerUtil.generateOutputFilePath(path);
86+
87+
String realPath = FileHandlerUtil.generateOutputFilePath(
88+
path,
89+
FileHandlerUtil.generateAuditFileName());
90+
8691
try {
8792
if (FileHandlerUtil.isFileAlreadyExists(realPath)) {
8893
randomAccessFile = new RandomAccessFile(realPath, CoreConstants.READ_WRITE);

src/main/java/org/audit4j/core/layout/SimpleLayout.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,8 @@ public void stop() {
9191
public void setDateFormat(String dateFormat) {
9292
this.dateFormat = dateFormat;
9393
}
94+
95+
public String getDateFormat() {
96+
return dateFormat;
97+
}
9498
}

0 commit comments

Comments
 (0)