Skip to content

Commit ce3dd79

Browse files
committed
added test cases. Added code changes
1 parent 2527ad4 commit ce3dd79

19 files changed

+3694
-13
lines changed

src/main/java/org/audit4j/core/ConfigUtil.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.audit4j.core.exception.TroubleshootException;
3434
import org.audit4j.core.handler.ConsoleAuditHandler;
3535
import org.audit4j.core.handler.Handler;
36+
import org.audit4j.core.handler.file.FileAuditHandler;
3637
import org.audit4j.core.layout.SimpleLayout;
3738

3839
import com.esotericsoftware.yamlbeans.YamlException;
@@ -62,19 +63,17 @@ private ConfigUtil() {
6263
static Configuration createDummyConfig() {
6364
Configuration conf = new Configuration();
6465
List<Handler> handlers = new ArrayList<>();
65-
/*DatabaseAuditHandler handler = new DatabaseAuditHandler();
66-
handler.setEmbedded("true");
67-
handler.setDb_driver("driver");
68-
handler.setDb_url("");
69-
handler.setDb_user("audit4juser");
70-
handler.setDb_password("password");
71-
handlers.add(handler);*/
66+
FileAuditHandler handler = new FileAuditHandler();
67+
handler.setArchive("true");
68+
handler.setCronPattern("1d1M");
69+
handlers.add(handler);
7270
//FileAuditHandler handler = new FileAuditHandler();
7371
//handlers.add(handler);
7472
ConsoleAuditHandler handler2 = new ConsoleAuditHandler();
7573
handlers.add(handler2);
7674
conf.setHandlers(handlers);
7775
conf.setLayout(new SimpleLayout());
76+
conf.setOptions("sd");
7877
Map<String,String> properties = new HashMap<String,String>();
7978
properties.put("log.file.location", "$user.dir");
8079
conf.setProperties(properties);
@@ -88,7 +87,7 @@ static Configuration createDummyConfig() {
8887
static void generateConfigFromObject() {
8988
YamlWriter writer;
9089
try {
91-
writer = new YamlWriter(new FileWriter("auit4j.conf.yml"));
90+
writer = new YamlWriter(new FileWriter("audit4j.conf.yml"));
9291
writer.getConfig().setClassTag("Configuration", Configuration.class);
9392
writer.write(createDummyConfig());
9493
writer.close();

src/main/java/org/audit4j/core/CoreConstants.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
/*
2-
<<<<<<< HEAD
32
* Copyright (c) 2014-2015 Janith Bandara, This source is a part of
4-
=======
5-
* Copyright 2014 Janith Bandara, This source is a part of
6-
>>>>>>> 8b76a53fd65d1fa87cf0839012fb0acd7945deef
73
* Audit4j - An open source auditing framework.
84
* http://audit4j.org
95
*

src/main/java/org/audit4j/core/PreConfigurationContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.audit4j.core.filter.AuditEventFilter;
3030

3131
/**
32-
* Registry for internal resource configurations.
32+
* Registry for internal initial resource configurations.
3333
*
3434
* @author <a href="mailto:[email protected]">Janith Bandara</a>
3535
*/

0 commit comments

Comments
 (0)