Getting several conditions in my output logfiles?

Hello! I am quite new to PsychoPy, and I am coding this experiment, where each participant reacts to several different stimuli. For each of these stimuli, there is a randomized condition, either 1 or 2.

Is it possible to save these differing conditions to my logfile? As the code is now, the condition variable just gets redefined, which means that the condition for the last instance of stimuli is the condition for every other stimuli in the logfile as well.

I hope my question is clear! Here is the part of my code that isn’t what it should be:

for i in stimuli: #for every stimuli 
    img = visual.ImageStim(win, i) #present image
    img.draw() #draw
    win.flip() #flip
    core.wait(2) 
    if i == 'stimuli\\stimulus_clothing.jpg':
        question.text = "How many items were in the {} of clothing?".format(priming_word_clothes[0])
        
        if priming_word_clothes[0] == "mountain":  
            Condition = 1
        elif priming_word_clothes[0] == "pile":  
            Condition = 2
            
    elif i == 'stimuli\\stimulus_demonstration.jpeg':
        question.text = "How many people were in the {}?".format(priming_word_people[0])
        
        if priming_word_people[0] == "assembly":  
            Condition = 1
        elif priming_word_people[0] == "mass":  
            Condition = 2