Move logger definition to global