This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from datetime import datetime | |
from pathlib import Path | |
import functools | |
from pprint import pformat | |
def get_func_name(func): | |
"""Return the name of the given function including module name""" | |
if func.__class__.__module__ == "builtins": | |
mod_name = func.__module__ if hasattr(func, '__module__') and \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from loguru import logger | |
from more_loguru import logger_wraps | |
logger.add('test.log', mode='w') | |
@logger_wraps(debug_io=True) | |
def my_func(a, b, c=1, d="Text"): | |
"""A test function""" | |
time.sleep(1) |