I'am trying to learn about logging. When i am created my first file handler, it has worked correctly. I created a file which named "Guesses_of_PC.log" and the handler has put it to the same path with py file.
But after i want that py project in another path so i created a new folder next to the py file and put that py file to new folder and also "Guesses_of_PC.log". But now, when i run py file, it still creates "Guesses_of_PC.log" in the first directory even i wrote new path to the handler. Why it behaves like that?
Thank you for your support. Here the code:
log_guess.setLevel(logging.INFO)
log_hand_guess=logging.FileHandler(filename="Guesses_of_PC.log")
log_guess.addHandler(log_hand_guess)
log_form_guess=logging.Formatter("%(asctime)s:%(levelname)s:%(name)s:%(message)s")
log_hand_guess.setFormatter(log_form_guess) ```
[1]: https://i.stack.imgur.com/BvUPm.png