plugin = plugin.strip(' \n')
module = 'sima.plugins.{0}.{1}'.format(source, plugin.lower())
try:
plugin = plugin.strip(' \n')
module = 'sima.plugins.{0}.{1}'.format(source, plugin.lower())
try:
- logfile = config.get('log', 'logfile')
+ # set logger
+ logger = logging.getLogger('sima')
+ logfile = config.get('log', 'logfile', fallback=None)
verbosity = config.get('log', 'verbosity')
set_logger(verbosity, logfile)
verbosity = config.get('log', 'verbosity')
set_logger(verbosity, logfile)
# Create Database
db_file = config.get('sima', 'db_file')
if (sopt.options.get('create_db', None)
# Create Database
db_file = config.get('sima', 'db_file')
if (sopt.options.get('create_db', None)
- or not isfile(db_file)):
- logger.info('Creating database in "{}"'.format(db_file))
+ or not isfile(db_file)):
+ logger.info('Creating database in "%s"', db_file)
open(db_file, 'a').close()
SimaDB(db_path=db_file).create_db()
if sopt.options.get('create_db', None):
logger.info('Done, bye...')
sys.exit(0)
open(db_file, 'a').close()
SimaDB(db_path=db_file).create_db()
if sopt.options.get('create_db', None):
logger.info('Done, bye...')
sys.exit(0)