Chosen Solution
For some reason, powerlogd is eating up a lot of cpu for no reason. Like it gets up to 80 and stays there for no reason. I got my battery serviced recently so it might be that but I just want to see if there is a fix for this. I have tried resetting the smc and the pram to no avail. Does anybody have any ideas on how to fix this? Update : Clean install fixed things
I believe Powerlogd is part of a third party application, starting to sound like you have a running hard process/memory leak issue. At this point I would backup my important stuff and wipe the drive fully and then rebuild things, slowly re-installing from good sources the OS and basic apps unless you know what Powerlogd is part of then remove that application.
Try to reset smc. https://support.apple.com/en-us/HT201295