summaryrefslogtreecommitdiff
path: root/alot/init.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/init.py')
-rwxr-xr-xalot/init.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/alot/init.py b/alot/init.py
index 34d3810a..d9405078 100755
--- a/alot/init.py
+++ b/alot/init.py
@@ -137,15 +137,11 @@ def main():
# setup logging
numeric_loglevel = getattr(logging, args['debug-level'].upper(), None)
logfilename = os.path.expanduser(args['logfile'])
- logging.basicConfig(level=numeric_loglevel, filename=logfilename)
- log_formatter = logging.Formatter('%(levelname)s:%(message)s')
- log_handler = logging.FileHandler(logfilename, encoding='utf-8')
- log_handler.setFormatter(log_formatter)
- logger = logging.getLogger()
- logger.setLevel(numeric_loglevel)
- logger.addHandler(log_handler)
-
- #logger.debug(commands.COMMANDS)
+ logformat = '%(levelname)s:%(module)s:%(message)s'
+ logging.basicConfig(level=numeric_loglevel, filename=logfilename,
+ format=logformat)
+
+ #logging.debug(commands.COMMANDS)
# get ourselves a database manager
dbman = DBManager(path=args['mailindex-path'], ro=args['read-only'])
@@ -171,7 +167,6 @@ def main():
# set up and start interface
UI(dbman,
- logger,
aman,
cmd,
args['colour-mode'],