I got a custom script server side and I just want to add logging to it, here is sample of my code
from frappe.exceptions import DoesNotExistError
@frappe.whitelist()
def do_some_stuff(args):
try:
frappe.get_list("Issue", "myissue")
<logging here to show success>
except DoesNotExistError:
<I want to add logging here to show something in the logs>
What is the easiest way to go about this assuming either one of these things:
- I want to use the default logger object or
- I have to create my own logger