Archiving mechanism
<p>I'm working on an archiving mechanism of my application's log files and would like some advice.</p>

<p><strong>What I want to do:</strong> When receiving a LogEntry, the LogListenerService will save it in a buffer and at some point it will print all the log entries in a file. When the file reaches a certain size an archiving service is called that will zip the contents of the log files and clean it.</p>

<p>I've implemented most of the functionality but have some questions:</p>

<ol>
<li>How do I go about defining the ideal size of the buffer?</li>
<li>How do I make sure the log file size is kept under a given "maximum size"?</li>
</ol>

<p>Thanks</p>
