// before
void log_event(const char* msg) {
    static int count = 0;
    printf("[%d] %s\n", count, msg);
    count++;
}
