Setup logger before any other state/ops

Fixes the bug of potentially losing logs during setup of extra state because the global logger has not been set up at that time.