[yast-devel] user readable logging
Hi! We had user requests (fate#100386) to provide the logging that would be readable to users. Such logs should provide the information what certain YaST action is really doing to the system and exclude all the internal debug info our y2logs are full of. Martin and Stano created some concept and added new logging functions y2usernote and y2useritem. These log to the new log file, /var/log/YaST2/y2changes (or $HOME/.y2changes). The question which is still not resolved is how should we use these functions? Which events our modules produce should provide description as "note" and which should provide "items"? What level of complexity should be presented to user? Should we log the real actions, just like commands passed to system agent or rather the explanations of the actions taken? Or both? Let's go to the example. I've added these functions to yast2-users, it's in svn already (update of perl-bindings is needed). At first, I started logging actions done in Write function. I deleted one user and renamed another. See the first y2changes file attached or look here http://pastebin.com/m2c5ec8fe. Now, it is not bad, but the item "File written: '/etc/group'" doesn't give much detailed info about what was done to that file. Stano proposed printing the diffs of the original and modified one: see y2changes-with-diffs file (or look at http://pastebin.com/m3bac2086) Here, the user knows more about the real changes, but the log file is getting a bit less readable again... still I think I'd prefer it. You could see on examples that I don't really use the advantage of having 2 logging functions. AFAIK Martin's original proposal was to use items to tell what actions are we going to perform and notes to log the details of such action. This is hardly achievable in yast2-users module (may be better with others), since at the time of writing we don't know the "user actions" taken, this is the info which is known when user is clicking in the UI (*). So another idea is to log directly when users is using UI and not at the time of write. See the last example, y2changes-UI (or http://pastebin.com/m23a3debb). This is not a full log this time, just part of it. I think the last method is getting more talkative and actually is not more helpful. So - comments? Proposals? Jiri (*) Actually it would need to be cached during the UI-clicking and logged at the time of writing only if user doesn't cancel the actions. -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz
2009/2/13 Jiří Suchomel
What level of complexity should be presented to user? Should we log the real actions, just like commands passed to system agent or rather the explanations of the actions taken? Or both?
From my point of view, please keep it clean and simple. Logg commands
I have also always wanted this function :-) passed to the system. If that log is present , then there is always the possibility to work on that log later to educate us. Perhaps a KDE-Edu application that could be made to work on the log? Or a small programming competition that makes an Yast-Educator module :-) Regars / birger -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Birger Kollstrand
-
Jiří Suchomel