1. A computer-implemented method, comprising: at a portable computing device having volatile memory and non-volatile memory: (a) obtaining, from a mobile application running on the portable computing device, a plurality of events to be logged; (b) serializing the plurality of events to be logged to produce a serialized form of the events; (c) storing the serialized form of the events in volatile memory of the device; (d) encrypting the serialized form of the events to produce a serialized and encrypted form of the events; (e) storing the serialized and encrypted form of the events in non-volatile memory of the device; (f) decrypting the serialized and encrypted form of the events to produce a serialized and decrypted form of the events; (g) storing the serialized and decrypted form of the events in volatile memory of the device; (h) compressing the serialized and decrypted form of the events to produce a compressed, serialized, and decrypted form of the events; (i) encrypting the compressed, serialized, and decrypted form of the events to produce an encrypted, compressed, and serialized form of the events and storing the encrypted, compressed, and serialized form of the events in non-volatile memory of the device.