Take a look at the EventLogger: http://logging.apache.org/log4j/2.x/manual/eventlogging.html
Javadocs: http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/EventLogger.html http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/message/StructuredDataMessage.html http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html On 4 August 2014 09:08, Rebecca Ahlvarsson <rahlvars...@gmail.com> wrote: > I am interested in using log4j for audit logging, in other words, I will > open my own file and start logging anything I want. Therefore I do NOT want > to use warn, info or any log level. Something like that: > > Log log = new Log("blah.txt"); > log.log("Test"); > log.close(); > > How can I do that with LOG4J? > > A concrete example that I can run will be very appreciated. > > Thanks, > > Rebecca Ahlvarsson > > -- Matt Sicker <boa...@gmail.com>