# Path: turbo/conf.py
# class ObjectDict(dict):
# class AppConfig(object):
#     def __getattr__(self, name):
#         def __setattr__(self, name, value):
#     def __init__(self):
#     def log_level(self):


import os
import sys
import logging
import logging.handlers
from turbo.conf import app_config
    while True:
        # root path check
        path = os.path.dirname(path)
        if path == '/':
            break

        # project root path
        dirname = os.path.basename(path)
        if dirname == app_config.project_name:
            break
        logger_name_list.append(dirname)

    logger_name_list.reverse()

    return logging.getLogger('.'.join(logger_name_list))


def getLogger(currfile=None, level=None, log_path=None, log_size=500 * 1024 * 1024, log_count=3):
    # init logger first
    logger = None

    # py module logger
    if currfile is not None:
        path = os.path.abspath(currfile)
        if os.path.isfile(path):
            logger = _module_logger(path)
        elif isinstance(currfile, basestring_type) and currfile.strip():
            # normal logger
            logger = logging.getLogger(currfile)


# Path: turbo/conf.py
# class ObjectDict(dict):
# class AppConfig(object):
#     def __getattr__(self, name):
#         def __setattr__(self, name, value):
#     def __init__(self):
#     def log_level(self):


# Path: turbo/log.py
import os
import sys
import logging
import logging.handlers
from turbo.conf import app_config

    while True:
        # root path check
        path = os.path.dirname(path)
        if path == '/':
            break

        # project root path
        dirname = os.path.basename(path)
        if dirname == app_config.project_name:
            break
        logger_name_list.append(dirname)

    logger_name_list.reverse()

    return logging.getLogger('.'.join(logger_name_list))


def getLogger(currfile=None, level=None, log_path=None, log_size=500 * 1024 * 1024, log_count=3):
    # init logger first
    logger = None

    # py module logger
    if currfile is not None:
        path = os.path.abspath(currfile)
        if os.path.isfile(path):
            logger = _module_logger(path)
        elif isinstance(currfile, basestring_type) and currfile.strip():
            # normal logger
            logger = logging.getLogger(currfile)


        logger.setLevel(level or app_config.log_level)