Req URGENT: a better logging procedure for kodi
#1
Exclamation 
Hi kodi develpers,

first of all I wanted to tell you that you have created a really nice media player. Good job! It will replace clementine in near future. You should link tweaking of the advanced settings, of which I already did find detailed explanation in the wiki.
But I have to rant it is not linked on the initial wiki page and for me with somewhat hardware capable of running kodi was dependent on. :/
Of course I know there is still some work with the usability and interaction of kodi to do, because current state is somewhat inconsitent and annoys, but I at least will deliver you now frequently with feature requests and bugreports, to get a better working kodi with every release for myself as egocentric as I am.

Back to topic:
I created this thread because I just had a crash and kodi closed without telling anything and the log in kodi itself was empty even though I set it to log errors and as Software Designer myself, I want to check the log and see if it was kodis fault or my systems, so I can generate a bug report for you developers. Right now it is kinda hard to extract the log from the kodi internal log, if it is filled with the essential data about the crash anyhow, and I did not find its data in the userdata folder.

Target for you, I suppose, is to get rid of all the bugs in the somewhat rather closer then distant future, as utopian as we developers OF COURSE think =)

I
f not be bug free at least not have severe bugs, that make kodi crash completely, without any info to the user. I am thinking about the handling of exceptions and recovering from them, if possible, with sophisticated messages on what to do next for the user , and be it to just prompt to redo the last action or something like that, but to give you any meaningful advice I would have to dive in deeper into kodi development.

As a tip I want to tell you, you should not allow the user to choose what and how intensive the logging is done. the logs are in the end for you developers to have data to reproduce the bug or at least see what lead to the bug/crash so measurement to estimate its severity and lay out the tasks for the developer fixing it. If I think how it is always at my working place.

As for requesting features, but said in advance I am used to have a logger api and thus I got no real clue how to solve that logging problem in the kodi world, I got two requests,
  • set up some public bug tracker for kodi if there is none, where I can report bugs preferable with the forum login data as credentials. If there already is one point me to it please.
For detailed logging in the filesystem of the OS, I come up with three ideas on the fly, which might let you break out in laughter hard, but I am somewhat a weekend clown so it be fair. You might want to check the windows, android and linux way of generating log files on app crash, they be having somewhat and api for application developers to access the system logging, so even if kodi locks up and closes instantly without comment, some data be generated by the running system. If the language you used does not provide a logger on its own, which is called in case of crash.

Here they come:
  1. creating a file which has a predefined maximum size and pushes out on top and appends to the bottom of the file -> first in first out. Could be hard to implement though. Depends on the Input Output API of the OS.
  2. you create two system files in a log folder, which again is put into the userdata folder, if a predefined max-imum size of log file is reached, it be retired and the other file then is used as log until it is maximum size then the second and  by timestamp older fle gets overwritten and you just keep doing this back and forth. This could be confusing though.
  3. I assume the linux rotating logs can not be implemented since it does not work in a windows and android world or is that different? Never used OS logging for an application my self.
As I said you might break out in laughter, but this is just a quick brainstorming without any background knowledge in the language you used and/or system internal logging.

That I will dive in deeper next week. I am used to have language specific a logger api, which gives me the necessary tools for logging in files residing in the underlying OS, which I do not know if kodi development language provides, but it SHOULD probably does.
May I ask rather stupid in which language is the kodi implemented? Same as the addons or did you create an extra api for the addons/repositories? I did not research yet. Have enough to do with filling my kodi library with music and flix on this weekend and did underestimate kodi prior. Plus I am playing the Witcher 3 right now which is rather time consuming but I assume you be understanding. it was so hard price reduced the other day I had to buy it-.-

with greetings, regards, and recognition for you work,
   Chris
Reply
#2
Kodi is written in C++ and the addons are written in python.

(2019-06-22, 11:58)kalmuneiu Wrote: You should link tweaking of the advanced settings, of which I already did find detailed explanation in the wiki.
If you mean have the instructions available on the forum then I guess you missed https://forum.kodi.tv/showthread.php?tid=323719 although granted that is tailored for Windows, however a simple Google search will get you to the wiki and to the Advanced instructions.

Most of the OS subsections have a FAQ Sticky at the top, for example Linux has https://forum.kodi.tv/showthread.php?tid=233369 that includes instructions for doing a backtrace.

(2019-06-22, 11:58)kalmuneiu Wrote: set up some public bug tracker[/i][/b][/u] for kodi if there is none, where I can report bugs preferable with the forum login data as credentials. If there already is one point me to it please.

As for bug tracker I guess you also missed this
Image
Reply
#3
@kalmuneiu

It's not that we don't appreciate enthusiastic Kodi users... but why is there an 'urgent' prefix as well as an exclamation mark on your thread title in a feature request? Is there a fire somewhere?
Kodi (and previously XBMC) is now some 15 years running. By all means it is not perfect for everyone, and there is plenty of work ahead of us. But I think we got most of it right already.

As already indicated, we do have a bug tracker in place. So what gives?
Reply
#4
(2019-06-22, 11:58)kalmuneiu Wrote: I created this thread because I just had a crash and kodi closed without telling anything and the log in kodi itself was empty.
The Kodi.log file location Log file/Advanced (wiki) would depend on the platform and how your run it. Kodi always creates a log, but is more detailed when the user turns on logging. For support questions, a complete full debug with logging enabled posted to a public pastebin and that URL linked with a description of the issue should be posted in the support forum for that platform and o/s.
(2019-06-22, 11:58)kalmuneiu Wrote: sophisticated messages on what to do next for the user
The log already contains messages that most users could understand and help pinpoint the problem, failing that; a post here with many experienced users will offer their experiences. (The debug log usually resides in the Kodi/roaming folder as Kodi.log) Your 1)2)3) suggestions, are handled with Kodi.log, Kodi.old.log and cross platform limitations.
(2019-06-22, 11:58)kalmuneiu Wrote: I will dive in deeper next week
I can only hope that you are swimming in shallow waters.
Reply

Logout Mark Read Team Forum Stats Members Help
URGENT: a better logging procedure for kodi0