Log spam from JSON query
#1
I have a script that runs when home window is activated to show album widgets.  The script only shows 15 widgets, but uses a JSON call GetAlbumsByWhere query: SELECT albumview.* FROM albumview  WHERE albumview.strReleaseType = 'album' ORDER BY albumview.idAlbum

The problem is this spams my log with GetSongsByWhereJSON entiries.  Is there any way to cut down the amount of these log entries?

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix
Leia see: 304472
Reply
#2
My first thought is that you are using skin helper service - that is verbose/uses lots of JSON, and I can't quite make sense of what you are saying (GetAlbumsByWhere isn't a JSON call, and the JSON calls that use it don't also use GetSongsByWhereJSON).

Can you clarify the JSON used, and/or let me have a log snippet that shows what you mean.
Reply
#3
What happens is for testing I created a large album smart playlist (928 items).  The script creates 12  random widgets of albums from the PLAYLIST path and filename via
Code:
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "music", "properties": ["dateadded"], "sort": {"method": "random"}}, "id": 1}' %(PLAYLIST))

When that call is made what is getting logged
Code:
T:11720   DEBUG <general>: CMusicDatabase::GetAlbumsByWhere query: SELECT albumview.* FROM albumview  WHERE albumview.strReleaseType = 'album' ORDER BY albumview.idAlbum

T:11720   DEBUG <general>: CMusicDatabase::GetSongsByWhereJSON query: SELECT sv.*, song_artist.idArtist AS idArtist FROM (SELECT song.idSong, strTitle FROM song  WHERE song.idAlbum = 795 ORDER BY song.idSong) AS sv JOIN song_artist ON song_artist.idSong = sv.idSong AND song_artist.idRole = 1 GROUP BY sv.idSong, song_artist.idArtist ORDER BY sv.idSong, song_artist.iOrder

T:11720   DEBUG <general>: CMusicDatabase::GetSongsByWhereJSON - query took 1 ms
 
The last 2 GetSongsByWhere repeat 100s of times as it iterates through all the albums (I assume -- the idAlbum is different in each logged line).  I guess I could write something to strip out those lines form the logs, in the mean time pare down the playlist.  Note it's only a problem for reading through logs trying to find things among all those query logged lines.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix
Leia see: 304472
Reply



Logout Mark Read Team Forum Stats Members Help
Log spam from JSON query0
This forum uses Lukasz Tkacz MyBB addons.