Demonstrate three methods to collect the private log, and diff them
Socket & Pipe (Provider) & EventLog
addition thread(client side) | independency client & server | server start by client | FileDescriptor count | BufferSize | |
---|---|---|---|---|---|
SocketLog | ✓ | ✓ | × | N/N client | 128K (user changable) |
ProviderLog | × | ✓ | ✓ | 1/N client | 4K |
EventLog | × | × | × | 0 | 256K (user changable) |
additional thread (Client side): Android forbid the network call on MainThread, so require additional thread to send socket message
independency Client & Server: when Client start log message, whether Server must start at same time
Server start by client: Client can start Server if Server process crash or exit unexpectedly
FileDescriptor count: if there are too many clients connect Server at same time, Server process may fail because of FD size limit per process(1024)