diff --git a/mira/base.py b/mira/base.py index 0c638b1..cd3390a 100644 --- a/mira/base.py +++ b/mira/base.py @@ -131,12 +131,15 @@ def main(): parser = OptionParser() parser.add_option('-d', '--debug', dest='debug', help='Enable debug logging', action='store_true') + parser.add_option('-c', '--config', dest='config', help='Location of the config.toml', + default='/etc/mira/storage.json') (options, args) = parser.parse_args() verbosity = logging.DEBUG if options.debug else logging.INFO logging.basicConfig(stream=sys.stdout, level=verbosity) - bot = MiraBot("./config.toml") + logging.info('Loading config from %s' % (options.config)) + bot = MiraBot(options.config) loop = asyncio.get_event_loop() loop.run_until_complete(bot.connect())