Made logging of transitions dependable of environment.