Initializing the SD card should be done ONCE, in setup, not every time an event needs to be logged.
Serial.begin() belongs in setup(), too.
Initializing the SD card should be done ONCE, in setup, not every time an event needs to be logged.
Serial.begin() belongs in setup(), too.