I've looked all over the documentation, but was unable to find one. How can I achieve this?
Asked
Active
Viewed 574 times
1 Answers
0
According to the Audit4j documentation and javadoc there are multiple ways to specify the configuration:
- It can be injected into the Context directly by calling static methods of the Context class (e.g. at application startup before doing any audit!):
- Context#initWithConfiguration(Configuration configuration) with the appropriate Configuration
- or Context#initWithConfiguration(String configFilePath) to specify the configuration as file.
- Other ways to specify the path to the configuration file without manually initializing the Context are:
- Setting path in environment variable "AUDIT4J_CONF_FILE_PATH"
- Setting path in Java system property variable "audit4j.conf.file.path"
- Also the configuration file can be put into the application classpath or the user directory. In this case the name of the configuration file has to be "audit4j.conf.yml" or "audit4j.conf.yaml" for YAML style or "audit4j.conf.xml" for XML style.

ltlBeBoy
- 1,242
- 16
- 23