From 5bf6b779acb6afcf47f6cc3ddca5d8c308bba728 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 15 Oct 2014 23:56:59 +0200 Subject: [PATCH] local: Add basic logging of scan errors --- mopidy/local/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mopidy/local/commands.py b/mopidy/local/commands.py index 5cf9f64f..d72a4477 100644 --- a/mopidy/local/commands.py +++ b/mopidy/local/commands.py @@ -85,7 +85,11 @@ class ScanCommand(commands.Command): logger.info('Found %d files in media_dir.', len(file_mtimes)) - # TODO: log file errors + if file_errors: + logger.warning('Encountered %d errors while scanning media_dir.', + len(file_errors)) + for name in file_errors: + logger.debug('Scan error %r for %r', file_errors[name], name) num_tracks = library.load() logger.info('Checking %d tracks from library.', num_tracks)