Skip to content

Commit

Permalink
Allow user to enable debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Feb 23, 2023
1 parent f523f7b commit f92269d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SettingsTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ body:
label: "Show all games with empty search"
defaultValue: "true"
description: "Shows all games when search Query is empty and the Action Keyword is used"
- type: checkbox
attributes:
name: Debug
label: "Debug"
defaultValue: "false"
description: "Enable Debug logging"
3 changes: 3 additions & 0 deletions plugin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def query(self, query):
self._steam = Steam(self.settings.get('steam_path', None))
if not self.settings.get('steam_path'):
self.settings['steam_path'] = str(self._steam.path)
debug = self.settings.get('debug', False)
if debug:
self.logger_level = 'DEBUG'
games = self._steam.all_games()
users = self._steam.loginusers()
most_recent_user = users.most_recent() or users[0]
Expand Down

0 comments on commit f92269d

Please sign in to comment.