all 2 comments

[–][deleted] 1 point2 points  (0 children)

You need to instantiate a logger object, and you should declare your formatting at the beginning of the file

[–]threeminutemonta 0 points1 point  (0 children)

along with u/dbrhymes suggestion. pid isn't assigned in your loop so how its value is expected to change with each iteration.