# Path: urbanaccess/utils.py
# def log(message, level=None, name=None, filename=None):
#     """
#     Write a message to the log file and/or print to the console.
# 
#     Parameters
#     ----------
#     message : string
#         the content of the message to log
#     level : int, optional
#         one of the logger.level constants
#     name : string, optional
#         name of the logger
#     filename : string, optional
#         name of the log file
# 
#     Returns
#     -------
#     None
#     """
# 
#     if level is None:
#         level = lg.INFO
#     if name is None:
#         name = config.settings.log_name
#     if filename is None:
#         filename = config.settings.log_filename
# 
#     if config.settings.log_file:
#         # get the current logger or create a new one then log message at
#         # requested level
#         logger = _get_logger(level=level, name=name, filename=filename)
#         if level == lg.DEBUG:
#             logger.debug(message)
#         elif level == lg.INFO:
#             logger.info(message)
#         elif level == lg.WARNING:
#             logger.warning(message)
#         elif level == lg.ERROR:
#             logger.error(message)
# 
#     # if logging to console is turned on, convert message to ascii and print
#     #  to the console only
#     if config.settings.log_console:
#         # capture current stdout, then switch it to the console, print the
#         # message, then switch back to what had been the stdout
#         # this prevents logging to notebook - instead, it goes to console
#         standard_out = sys.stdout
#         sys.stdout = sys.__stdout__
# 
#         # convert message to ascii for proper console display in windows
#         # terminals
#         message = unicodedata.normalize('NFKD', str(message)).encode(
#             'ascii', errors='replace').decode()
#         print(message)
#         sys.stdout = standard_out
#     # otherwise print out standard statement
#     else:
#         print(message)


import os
import logging as lg
from urbanaccess.utils import log
            df = df.drop(outside_boundingbox.index)
            log('Removed identified stops that are outside of bounding box.')
        else:
            log('Stops found outside of bounding box were not removed. '
                'Set remove=True to remove stops outside of bounding box.')
    else:
        log('No GTFS feed stops were found to be outside the bounding box '
            'coordinates.')
    return df


def _checkcoordinates(df, feed_folder):
    """
    Check and print the hemisphere that stop coordinates are in

    Parameters
    ----------
    df : pandas.DataFrame
        stops DataFrame
    feed_folder : str
        name of originating GTFS feed folder, will be the basename
        directory folder for the GTFS feed

    Returns
    -------
    None

    """
    feed_name = os.path.split(feed_folder)[1]
    if (df['stop_lat'] > 0).values.any() & (df['stop_lon'] < 0).values.any():

# Path: urbanaccess/utils.py
# def log(message, level=None, name=None, filename=None):
#     """
#     Write a message to the log file and/or print to the console.
# 
#     Parameters
#     ----------
#     message : string
#         the content of the message to log
#     level : int, optional
#         one of the logger.level constants
#     name : string, optional
#         name of the logger
#     filename : string, optional
#         name of the log file
# 
#     Returns
#     -------
#     None
#     """
# 
#     if level is None:
#         level = lg.INFO
#     if name is None:
#         name = config.settings.log_name
#     if filename is None:
#         filename = config.settings.log_filename
# 
#     if config.settings.log_file:
#         # get the current logger or create a new one then log message at
#         # requested level
#         logger = _get_logger(level=level, name=name, filename=filename)
#         if level == lg.DEBUG:
#             logger.debug(message)
#         elif level == lg.INFO:
#             logger.info(message)
#         elif level == lg.WARNING:
#             logger.warning(message)
#         elif level == lg.ERROR:
#             logger.error(message)
# 
#     # if logging to console is turned on, convert message to ascii and print
#     #  to the console only
#     if config.settings.log_console:
#         # capture current stdout, then switch it to the console, print the
#         # message, then switch back to what had been the stdout
#         # this prevents logging to notebook - instead, it goes to console
#         standard_out = sys.stdout
#         sys.stdout = sys.__stdout__
# 
#         # convert message to ascii for proper console display in windows
#         # terminals
#         message = unicodedata.normalize('NFKD', str(message)).encode(
#             'ascii', errors='replace').decode()
#         print(message)
#         sys.stdout = standard_out
#     # otherwise print out standard statement
#     else:
#         print(message)


# Path: urbanaccess/gtfs/utils_validation.py
import os
import logging as lg
from urbanaccess.utils import log

            df = df.drop(outside_boundingbox.index)
            log('Removed identified stops that are outside of bounding box.')
        else:
            log('Stops found outside of bounding box were not removed. '
                'Set remove=True to remove stops outside of bounding box.')
    else:
        log('No GTFS feed stops were found to be outside the bounding box '
            'coordinates.')
    return df


def _checkcoordinates(df, feed_folder):
    """
    Check and print the hemisphere that stop coordinates are in

    Parameters
    ----------
    df : pandas.DataFrame
        stops DataFrame
    feed_folder : str
        name of originating GTFS feed folder, will be the basename
        directory folder for the GTFS feed

    Returns
    -------
    None

    """
    feed_name = os.path.split(feed_folder)[1]
    if (df['stop_lat'] > 0).values.any() & (df['stop_lon'] < 0).values.any():

        log('{} GTFS feed stops: coordinates are in northwest hemisphere. '