tony19/logback-android — pull request #57 by SierraGolf (2013-12-29 13:36:32+00:00)
Title: Adding a FileBufferingSocketAppender

The ```FileBufferingSocketAppender``` and it's auxiliary classes provide the following features in addition to a regular SocketAppender:

* events are buffered (serialized) to disk
* events are send in batches
* events are send in intervals
* events are persistent, even when there is currently no socket connection or there is an error during transmission
* events will be evicted from disk in a FIFO mode, defined through a file count quota (amount of log events)

The new appender takes the following configuration:
* logFolder (required)
* fileEnding (default: .ser)
* batchSize (default: 50)
* readInterval (default: 1min)
* fileCountQuota (default: 500)

Furthermore it provides the same configuration interfaces as the ```SocketAppender```. Internally it holds an instance of the ```SocketAppender``` of which it manages the state and to which it delegates the previously mentioned configuration interface calls.

Discussion/Questions:
1. why is there no SSLSocketAppender in the logback-android fork?
2. what would be the best "logback way" to make the current implementation not use a composition but an aggregation instead? so that the ```SocketAppender``` would not be instantiated by the ```FileBufferingSocketAppender```but through the regular logback mechanisms.
3. why is there a configuration check (address != null) in the SocketAppenderBase.append (now tryAppend) method?
4. What would be the best way to do a full-integration test of the new appender?
5. Though the new appender is mostly useful in context of remote logging with android it might also makes sense to push it all the way upstream to the logback origin and rebase the logback-android project to it. What do you think?