logger: bugfix in presence of MERLIN_LOG