pypet/pypetlogging.py
def simple_logging_config(func):
    """Decorator to allow a simple logging configuration.

    This encompasses giving a `log_folder`, `logger_names` as well as `log_levels`.

    """

    @functools.wraps(func)
    def new_func(self, *args, **kwargs):
        if use_simple_logging(kwargs):
            if 'log_config' in kwargs:
                raise ValueError('Please do not specify `log_config` '
                                 'if you want to use the simple '
                                 'way of providing logging configuration '
                                 '(i.e using `log_folder`, `logger_names` and/or `log_levels`).')
            _change_logging_kwargs(kwargs)

        return func(self, *args, **kwargs)

    return new_func
def simple_logging_config(func):
    @functools.wraps(func)
    def new_func(self, *args, **kwargs):
        if use_simple_logging(kwargs):
            if 'log_config' in kwargs:
                raise ValueError('Please do not specify `log_config` '
                                 'if you want to use the simple '
                                 'way of providing logging configuration '
                                 '(i.e using `log_folder`, `logger_names` and/or `log_levels`).')
            _change_logging_kwargs(kwargs)

        return func(self, *args, **kwargs)

    return new_func
def simple_logging_config ( func ) : @ functools . wraps ( func ) def new_func ( self , * args , * * kwargs ) : if use_simple_logging ( kwargs ) : if 'log_config' in kwargs : raise ValueError ( 'Please do not specify `log_config` ' 'if you want to use the simple ' 'way of providing logging configuration ' '(i.e using `log_folder`, `logger_names` and/or `log_levels`).' ) _change_logging_kwargs ( kwargs ) return func ( self , * args , * * kwargs ) return new_func
Decorator to allow a simple logging configuration.

    This encompasses giving a `log_folder`, `logger_names` as well as `log_levels`.
Decorator to allow a simple logging configuration .