This file is indexed.

/usr/lib/python3/dist-packages/channels/log.py is in python3-django-channels 1.1.8.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import logging

handler = logging.StreamHandler()


def setup_logger(name, verbosity=1):
    """
    Basic logger for runserver etc.
    """

    formatter = logging.Formatter(
        fmt='%(asctime)s - %(levelname)s - %(module)s - %(message)s')

    handler.setFormatter(formatter)

    # Set up main logger
    logger = logging.getLogger(name)
    logger.setLevel(logging.INFO)
    logger.addHandler(handler)
    if verbosity > 1:
        logger.setLevel(logging.DEBUG)

    # Set up daphne protocol loggers
    for module in ["daphne.ws_protocol", "daphne.http_protocol", "daphne.server"]:
        daphne_logger = logging.getLogger(module)
        daphne_logger.addHandler(handler)
        daphne_logger.setLevel(
            logging.DEBUG if verbosity > 1 else logging.INFO)

    logger.propagate = False
    return logger