# Path: pypet/pypetlogging.py
# def use_simple_logging(kwargs):
#     """Checks if simple logging is requested"""
#     return any([x in kwargs for x in ('log_folder', 'logger_names',
#                                       'log_levels', 'log_multiproc', 'log_level')])


import functools
import ast
import os
import configparser as cp
from pypet.pypetlogging import use_simple_logging
    def _collect_section(self, section):
        """Collects all settings within a section"""
        kwargs = {}
        try:
            if self.parser.has_section(section):
                options = self.parser.options(section)
                for option in options:
                    str_val = self.parser.get(section, option)
                    val = ast.literal_eval(str_val)
                    kwargs[option] = val
            return kwargs
        except:
            raise  # You can set a break point here for debugging!

    def _collect_config(self):
        """Collects all info from three sections"""
        kwargs = {}
        sections = ('storage_service', 'trajectory', 'environment')
        for section in sections:
            kwargs.update(self._collect_section(section))
        return kwargs

    def interpret(self):
        """Copies parsed arguments into the kwargs passed to the environment"""
        if self.config_file:
            new_kwargs = self._collect_config()
            for key in new_kwargs:
                # Already specified kwargs take precedence over the ini file
                if key not in self.kwargs:
                    self.kwargs[key] = new_kwargs[key]

# Path: pypet/pypetlogging.py
# def use_simple_logging(kwargs):
#     """Checks if simple logging is requested"""
#     return any([x in kwargs for x in ('log_folder', 'logger_names',
#                                       'log_levels', 'log_multiproc', 'log_level')])


# Path: pypet/utils/configparsing.py
import functools
import ast
import os
import configparser as cp
from pypet.pypetlogging import use_simple_logging

    def _collect_section(self, section):
        """Collects all settings within a section"""
        kwargs = {}
        try:
            if self.parser.has_section(section):
                options = self.parser.options(section)
                for option in options:
                    str_val = self.parser.get(section, option)
                    val = ast.literal_eval(str_val)
                    kwargs[option] = val
            return kwargs
        except:
            raise  # You can set a break point here for debugging!

    def _collect_config(self):
        """Collects all info from three sections"""
        kwargs = {}
        sections = ('storage_service', 'trajectory', 'environment')
        for section in sections:
            kwargs.update(self._collect_section(section))
        return kwargs

    def interpret(self):
        """Copies parsed arguments into the kwargs passed to the environment"""
        if self.config_file:
            new_kwargs = self._collect_config()
            for key in new_kwargs:
                # Already specified kwargs take precedence over the ini file
                if key not in self.kwargs:
                    self.kwargs[key] = new_kwargs[key]

            if not use_simple_logging(self.kwargs) and 'log_config' not in self.kwargs: