1f2dd73976e872c195af0763081fbee2aadae0bd,pwnagotchi/log.py,,setup_logging,#Any#Any#,216

Before Change


    // https://stackoverflow.com/questions/24344045/how-can-i-completely-remove-any-logging-from-requests-module-in-python?noredirect=1&lq=1
    logging.getLogger("urllib3").propagate = False
    requests_log = logging.getLogger("requests")
    requests_log.addHandler(logging.NullHandler())
    requests_log.propagate = False


def log_rotation(filename, cfg):

After Change


    console_handler.setFormatter(formatter)
    root.addHandler(console_handler)

    if not args.debug:
        // disable scapy and tensorflow logging
        logging.getLogger("scapy").disabled = True
        logging.getLogger("tensorflow").disabled = True
        // https://stackoverflow.com/questions/15777951/how-to-suppress-pandas-future-warning
        warnings.simplefilter(action="ignore", category=FutureWarning)
        warnings.simplefilter(action="ignore", category=DeprecationWarning)
        // https://stackoverflow.com/questions/24344045/how-can-i-completely-remove-any-logging-from-requests-module-in-python?noredirect=1&lq=1
        logging.getLogger("urllib3").propagate = False
        requests_log = logging.getLogger("requests")
        requests_log.addHandler(logging.NullHandler())
        requests_log.prpagate = False


def log_rotation(filename, cfg):
    rotation = cfg["rotation"]
    if not rotation["enabled"]:
        return
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: evilsocket/pwnagotchi
Commit Name: 1f2dd73976e872c195af0763081fbee2aadae0bd
Time: 2020-04-13
Author: 33197631+dadav@users.noreply.github.com
File Name: pwnagotchi/log.py
Class Name:
Method Name: setup_logging


Project Name: catalyst-team/catalyst
Commit Name: 4ba6e85223cdd4dd020f0414895b530c85d134cf
Time: 2020-01-12
Author: lightsanweb@yandex.ru
File Name: catalyst/dl/callbacks/logging.py
Class Name: ConsoleLogger
Method Name: _get_logger


Project Name: allenai/allennlp
Commit Name: 5b988d637d9d2fde405eb0d0bc22b3bdb4012ad2
Time: 2020-07-07
Author: epwalsh10@gmail.com
File Name: allennlp/common/logging.py
Class Name:
Method Name: prepare_global_logging


Project Name: williamFalcon/pytorch-lightning
Commit Name: bc577ca7923387384c015d7e04d5b0c4e5f1afd9
Time: 2021-03-02
Author: aedu.waelchli@gmail.com
File Name: pytorch_lightning/__init__.py
Class Name:
Method Name: