blunsky 0 Newbie Poster

Hi,

I am trying to log information from my application to memory. I have achieved this using the MemoryHandler Object. However, upon command I need to be able to write this to a log file on the hard drive.
I would like the file to be 10 MB, so that it only takes up 10MB of RAM during normal operation, and then 10MB on the hard drive when the instruction to write is given.

My primary problem is that when the MemoryHandler object overflows (reaches its capacity), it empties itself, so if I write the log to a file just after it has overflowed, I only receive the entries since overflow rather than than the last 10 MB. Basically, I need to MemoryHandler Object to remove the last entry every time a new entry is entered.

Any help would be greatly appreciated.

Benjamin

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.