I'm using java FileHandler
to append to a file, and occasionally rotate it. The data consists of JSON strings, one on each line. The file is consumed by another process, and I want the FileHandler
to only write the JSON string I pass into the publish method, without any xml metadata. How is this accomplished? I've scoured the internet for information about XMLFormatter
and FileHandler
, but all I've found are content farm tutorials that barely touch on the basics. Right now, I get the following written to the file:
<record>
<date>2016-01-06T15:05:54</date>
<millis>1452121554535</millis>
<sequence>14</sequence>
<level>INFO</level>
<thread>29</thread>
<message>MyMessage</message>
</record>
And all I want written is MyMessage.
Any help appreciated.