This file contains 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
# Logger gist available here: | |
# https://gist.github.com/TJMac93/cc17e0aa4546723cfba0d7165dbd9651 | |
from functools import wraps | |
from .logger import logger | |
import pandas as pd | |
def log_step(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): |
This file contains 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
# Logger gist available here: | |
# https://gist.github.com/TJMac93/cc17e0aa4546723cfba0d7165dbd9651 | |
from logger import logger | |
from functools import wraps | |
def main(): | |
def log_dec(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): |
This file contains 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 | |
logger = logging.getLogger(__name__) | |
# Handler determines where the logs are output | |
file_handler = logging.FileHandler("./history.log") | |
shell_handler = logging.StreamHandler() | |
# Set levels | |
logger.setLevel(logging.DEBUG) |