Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)
Returns the correct log directory path.
    

        def get_log_path():
    """ Returns the correct log directory path.
    """

    # The log directory to use if there's a problem.
    fallback_logdir = expanduser('~/')

    if os.name == 'posix':
        try:
            var_log = '/var/log/baboon'
            if not os.path.exists(var_log):
                os.makedirs(var_log)
            return var_log if os.path.isdir(var_log) else fallback_logdir
        except EnvironmentError:
            pass

    return fallback_logdir
        


src/b/a/baboon-0.1.4/baboon/baboond/dictconf.py   baboon(Download)
import sys
import logging
 
from baboon.common.config import get_log_path, get_null_handler
 

src/b/a/baboon-0.1.4/baboon/baboon/dictconf.py   baboon(Download)
import sys
import logging
 
from baboon.common.config import get_log_path, get_null_handler
 

src/b/a/baboon-HEAD/baboon/baboond/dictconf.py   baboon(Download)
import sys
import logging
 
from baboon.common.config import get_log_path, get_null_handler
 

src/b/a/baboon-HEAD/baboon/baboon/dictconf.py   baboon(Download)
import sys
import logging
 
from baboon.common.config import get_log_path, get_null_handler