Fix EventLogging (variable was read before initialization)

Bug: 49861
Change-Id: Ic6910a0538f1988d32b507ca972ed7efc65d2669