πLogging
How to use Pylenium's built-in logger
Last updated
# You can import this in any file
from pylenium.log import logger as log
# Log this
def add_to_cart(item: str, quantity: int):
log.this("Adding %s %s to my cart", quantity, item)
...
# Then call the function
add_to_cart("Charizard", 3)
>>> USER Adding 3 Charizard to my cart# Log this
def add_to_cart(py: Pylenium, item: str, quantity: int):
py.log.this("Adding %s %s to my cart", quantity, item)
...
# Then call the function
add_to_cart(py, "Charizard", 3)
>>> USER Adding 3 Charizard to my cart