From 5caac243a296970eb83ca2aa1218a9b4b8f2c47b Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 7 Aug 2019 14:39:31 -0700 Subject: [PATCH] frontpage: Log a message when loading custom shortcuts Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/frontpage.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plinth/frontpage.py b/plinth/frontpage.py index 1f448e3c4..1feeb53ab 100644 --- a/plinth/frontpage.py +++ b/plinth/frontpage.py @@ -17,13 +17,17 @@ """ Manage application shortcuts on front page. """ + import json +import logging import os from plinth import app, cfg from . import actions +logger = logging.getLogger(__name__) + class Shortcut(app.FollowerComponent): """An application component for handling shortcuts.""" @@ -173,6 +177,7 @@ def get_custom_shortcuts(): cfg_dir = os.path.dirname(cfg.config_file) shortcuts_file = os.path.join(cfg_dir, 'custom-shortcuts.json') if os.path.isfile(shortcuts_file) and os.stat(shortcuts_file).st_size: + logger.info('Loading custom shortcuts from %s', shortcuts_file) with open(shortcuts_file) as shortcuts: custom_shortcuts = json.load(shortcuts) return custom_shortcuts