Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greatly increase the amount of logging information. #38

Merged
merged 6 commits into from
Jul 11, 2019

Conversation

oddstr13
Copy link
Member

@oddstr13 oddstr13 commented Jul 8, 2019

The main change so far is to include file paths and line numbers on log output.

Log all calls to __getitem__ and __shortcuts__ (DEBUG, noisy)

Some flake8 errors corrected.

Currently prints some stacktraces that probably shouldn't be printed, but my opinion on that is to keep it like that until exception handling can be improved (and made much more specific) in those areas.

00:16:39.614 T:140707650131712  NOTICE: JELLYFIN.database.jellyfin_db -> ERROR::resources/lib/database/jellyfin_db.py:161 'NoneType' object has no attribute '__getitem__'
                                            Traceback (most recent call last):
                                              File "resources/lib/database/jellyfin_db.py", line 159, in get_version
                                                version = self.cursor.fetchone()[0]
                                            TypeError: 'NoneType' object has no attribute '__getitem__'

Also added editorconfig.

@oddstr13 oddstr13 added the WIP Work In Progress - DO NOT MERGE label Jul 8, 2019
@oddstr13 oddstr13 added cleanup Non-functional code cleanup/readability/formatting enhancement New feature or request and removed WIP Work In Progress - DO NOT MERGE labels Jul 9, 2019
@oddstr13 oddstr13 marked this pull request as ready for review July 9, 2019 22:20
@oddstr13 oddstr13 requested review from cvium and a team July 9, 2019 22:21
@@ -1,447 +1,447 @@
# -*- coding: utf-8 -*-
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this file had Windows file endings. Long live editorconfig?

@@ -334,6 +334,3 @@ def close_transcode(self, device_id):
return self._delete("Videos/ActiveEncodings", params={
'DeviceId': device_id
})

def delete_item(self, item_id):
return self.items("/%s" % item_id, "DELETE")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flake8 was kind enough to informing me that this was a duplicate definition.
You should be able to find the exact same code further up.

Copy link
Member

@cvium cvium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have the one comment

@oddstr13 oddstr13 requested a review from cvium July 10, 2019 14:40
@anthonylavado anthonylavado requested a review from a team July 10, 2019 21:21
@cvium cvium merged commit e72a124 into jellyfin:master Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Non-functional code cleanup/readability/formatting enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants